diff options
Diffstat (limited to 'modes/transparent_udp/transparent_udp.go')
-rw-r--r-- | modes/transparent_udp/transparent_udp.go | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/modes/transparent_udp/transparent_udp.go b/modes/transparent_udp/transparent_udp.go index 62d0689..eade8c8 100644 --- a/modes/transparent_udp/transparent_udp.go +++ b/modes/transparent_udp/transparent_udp.go @@ -33,8 +33,10 @@ import ( "bytes" "encoding/binary" "fmt" + options2 "github.com/OperatorFoundation/shapeshifter-dispatcher/common" "github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras" "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust" + replicant "github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant" "github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite" "github.com/OperatorFoundation/shapeshifter-transports/transports/shadow" "io" @@ -179,7 +181,7 @@ func dialConn(tracker *ConnTracker, addr string, target string, name string, opt fmt.Println("Dialing....") - args, argsErr := pt.ParsePT2ClientParameters(options) + args, argsErr := options2.ParseOptions(options) if argsErr != nil { log.Errorf("Error parsing transport options: %s", options) return @@ -242,14 +244,15 @@ func ServerSetup(termMon *termmon.TermMonitor, bindaddrString string, ptServerIn log.Errorf("obfs4 transport missing cert argument: %s", args) return } - //case "Replicant": - // Config, ok := args.Get("config") - // if !ok { - // return false, nil - // } - // - // transport := replicant.New(Config) - // listen = transport.Listen + case "Replicant": + config, ok := args.Get("config") + fmt.Println(config) + if !ok { + return false, nil + } + + transport := replicant.New(replicant.Config{}) + listen = transport.Listen case "Dust": idPath, ok := args.Get("idPath") if !ok { |