From e0f4ef87d6a6ef5518a40468c868164708788170 Mon Sep 17 00:00:00 2001 From: Bluesaxorcist Date: Mon, 16 Sep 2019 18:58:22 -0500 Subject: fixed transports to use configs --- modes/transparent_tcp/transparent_tcp.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modes/transparent_tcp') diff --git a/modes/transparent_tcp/transparent_tcp.go b/modes/transparent_tcp/transparent_tcp.go index 5535bd6..33534e7 100644 --- a/modes/transparent_tcp/transparent_tcp.go +++ b/modes/transparent_tcp/transparent_tcp.go @@ -33,6 +33,7 @@ import ( "fmt" options2 "github.com/OperatorFoundation/shapeshifter-dispatcher/common" "github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras" + "github.com/OperatorFoundation/shapeshifter-dispatcher/transports" "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust" replicant "github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant" "github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite" @@ -174,11 +175,15 @@ func ServerSetup(termMon *termmon.TermMonitor, bindaddrString string, ptServerIn return false, nil } - _, ok := shargs.Get("config") + configString, ok := shargs.Get("config") if !ok { return false, nil } - transport := replicant.New(replicant.Config{}) + config, err := transports.ParseReplicantConfig(configString) + if err != nil { + return false, nil + } + transport := replicant.New(config) listen = transport.Listen case "Dust": shargs, aok := args["Dust"] -- cgit v1.2.3