summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBluesaxorcist <joshua@operatorfoundation.org>2019-08-30 14:58:15 -0500
committerBluesaxorcist <joshua@operatorfoundation.org>2019-08-30 14:58:15 -0500
commitbfc867e0f07555b906ab7f3673aa3f6946a83bf9 (patch)
treefb7ace614f201ec40442b96151a8d3dce57a0ab2
parentab43189e79828cd54f8f78c8242e490cdd2770c6 (diff)
added Dust and commented in replicant's code to the four modes for future use
-rw-r--r--modes/pt_socks5/pt_socks5.go15
-rw-r--r--modes/stun_udp/stun_udp.go17
-rw-r--r--modes/transparent_tcp/transparent_tcp.go25
-rw-r--r--modes/transparent_udp/transparent_udp.go17
4 files changed, 74 insertions, 0 deletions
diff --git a/modes/pt_socks5/pt_socks5.go b/modes/pt_socks5/pt_socks5.go
index 240f3c0..dfd7359 100644
--- a/modes/pt_socks5/pt_socks5.go
+++ b/modes/pt_socks5/pt_socks5.go
@@ -31,6 +31,7 @@ package pt_socks5
import (
"github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras"
+ "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust"
"github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite"
"github.com/OperatorFoundation/shapeshifter-transports/transports/shadow"
"io"
@@ -191,6 +192,20 @@ 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 "Dust":
+ idPath, ok :=args.Get("idPath")
+ if !ok {
+ return false, nil
+ }
+ transport := Dust.NewDustServer(idPath)
+ listen = transport.Listen
case "meeklite":
Url, ok := args.Get("Url")
if !ok {
diff --git a/modes/stun_udp/stun_udp.go b/modes/stun_udp/stun_udp.go
index 511d7c9..f12e69e 100644
--- a/modes/stun_udp/stun_udp.go
+++ b/modes/stun_udp/stun_udp.go
@@ -32,6 +32,7 @@ package stun_udp
import (
"fmt"
"github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras"
+ "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust"
"github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite"
"github.com/OperatorFoundation/shapeshifter-transports/transports/shadow"
"io"
@@ -242,6 +243,22 @@ func ServerSetup(termMon *termmon.TermMonitor, bindaddrString string, ptServerIn
log.Errorf("meeklite transport missing Front argument: %s", args)
return
}
+ //case "replicant":
+ // if config, ok := args["config"]; ok {
+ // transport := replicant.New(config[0])
+ // listen = transport.Listen
+ // } else {
+ // log.Errorf("replicant transport missing config argument: %s", args)
+ // return
+ // }
+ case "Dust":
+ if idPath, ok := args["idPath"]; ok {
+ transport := Dust.NewDustServer(idPath[0])
+ listen = transport.Listen
+ } else {
+ log.Errorf("Dust transport missing idPath argument: %s", args)
+ return
+ }
case "shadow":
if password, ok := args["password"]; ok {
if cipher, ok2 := args["cipherName"]; ok2 {
diff --git a/modes/transparent_tcp/transparent_tcp.go b/modes/transparent_tcp/transparent_tcp.go
index def348f..faffa15 100644
--- a/modes/transparent_tcp/transparent_tcp.go
+++ b/modes/transparent_tcp/transparent_tcp.go
@@ -32,6 +32,7 @@ package transparent_tcp
import (
"fmt"
"github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras"
+ "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust"
"github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite"
"github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2"
"io"
@@ -165,6 +166,30 @@ func ServerSetup(termMon *termmon.TermMonitor, bindaddrString string, ptServerIn
case "obfs4":
transport := obfs4.NewObfs4Server(statedir)
listen = transport.Listen
+ //case "Replicant":
+ // shargs, aok := args["Replicant"]
+ // if !aok {
+ // return false, nil
+ // }
+ //
+ // config, ok := shargs.Get("config")
+ // if !ok {
+ // return false, nil
+ // }
+ // transport := replicant.New(config)
+ // listen = transport.Listen
+ case "Dust":
+ shargs, aok := args["Dust"]
+ if !aok {
+ return false, nil
+ }
+
+ idPath, ok := shargs.Get("Url")
+ if !ok {
+ return false, nil
+ }
+ transport := Dust.NewDustServer(idPath)
+ listen = transport.Listen
case "meeklite":
shargs, aok := args["meeklite"]
if !aok {
diff --git a/modes/transparent_udp/transparent_udp.go b/modes/transparent_udp/transparent_udp.go
index eeb8f35..3352228 100644
--- a/modes/transparent_udp/transparent_udp.go
+++ b/modes/transparent_udp/transparent_udp.go
@@ -34,6 +34,7 @@ import (
"encoding/binary"
"fmt"
"github.com/OperatorFoundation/shapeshifter-dispatcher/common/pt_extras"
+ "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust"
"github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite"
"github.com/OperatorFoundation/shapeshifter-transports/transports/shadow"
"io"
@@ -241,6 +242,22 @@ 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 "Dust":
+ idPath, ok := args.Get("idPath")
+ if !ok {
+ return false, nil
+ }
+
+ transport := Dust.NewDustServer(idPath)
+ listen = transport.Listen
case "meeklite":
Url, ok := args.Get("Url")
if !ok {