diff options
author | Bluesaxorcist <joshua@operatorfoundation.org> | 2019-10-21 18:25:03 -0500 |
---|---|---|
committer | Bluesaxorcist <joshua@operatorfoundation.org> | 2019-10-21 18:25:03 -0500 |
commit | 7548a703e3dbbf50fc66b08d4807790c7c165fec (patch) | |
tree | 1112e775d67ab284cff47090fc8c399d736438ba /modes/transparent_tcp | |
parent | 4a56b1440c2bc315adda61b542793b7780cb8730 (diff) |
Made the other three modes work
Diffstat (limited to 'modes/transparent_tcp')
-rw-r--r-- | modes/transparent_tcp/transparent_tcp.go | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/modes/transparent_tcp/transparent_tcp.go b/modes/transparent_tcp/transparent_tcp.go index c1482bb..06597e0 100644 --- a/modes/transparent_tcp/transparent_tcp.go +++ b/modes/transparent_tcp/transparent_tcp.go @@ -33,7 +33,9 @@ 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" "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2" "golang.org/x/net/proxy" @@ -140,23 +142,18 @@ func ServerSetup(ptServerInfo pt.ServerInfo, statedir string, options string) (l case "obfs4": transport := obfs4.NewObfs4Server(statedir) listen = transport.Listen - //FIXME make replicant case work for server side - //case "Replicant": - // shargs, aok := args["Replicant"] - // if !aok { - // return false, nil - // } - // - // configString, ok := shargs.Get("config") - // if !ok { - // return false, nil - // } - // config, err := transports.ParseReplicantConfig(configString) - // if err != nil { - // return false, nil - // } - // transport := replicant.New(config) - // listen = transport.Listen + case "Replicant": + shargs, aok := args["Replicant"] + if !aok { + return false, nil + } + + config, err := transports.ParseReplicantConfig(shargs) + if err != nil { + return false, nil + } + transport := replicant.New(*config) + listen = transport.Listen case "Dust": shargs, aok := args["Dust"] if !aok { |