summaryrefslogtreecommitdiff
path: root/modes/pt_socks5
diff options
context:
space:
mode:
authorBluesaxorcist <joshua@operatorfoundation.org>2019-08-11 11:24:36 -0500
committerBluesaxorcist <joshua@operatorfoundation.org>2019-08-11 11:24:36 -0500
commit81f2420ae53508f3366e8a47dd8e2e73f80b16e1 (patch)
tree70bbf332348a5370321b1a5cd36345d7e3ebfeda /modes/pt_socks5
parentfa1b158cc47e7f5d8958823ac51504c41a4b440e (diff)
commented in Optimizer and shadow code for later adjustment
Diffstat (limited to 'modes/pt_socks5')
-rw-r--r--modes/pt_socks5/pt_socks5.go46
1 files changed, 46 insertions, 0 deletions
diff --git a/modes/pt_socks5/pt_socks5.go b/modes/pt_socks5/pt_socks5.go
index 14b55e1..8ff2528 100644
--- a/modes/pt_socks5/pt_socks5.go
+++ b/modes/pt_socks5/pt_socks5.go
@@ -136,6 +136,52 @@ func clientHandler(target string, termMon *termmon.TermMonitor, name string, con
socksReq.Reply(socks5.ReplyGeneralFailure)
return
}
+ //case "shadow":
+ // if password, ok := args["password"]; ok {
+ // if cipher, ok2 := args["cipherName"]; ok2 {
+ // transport := shadow.NewShadowClient(password[0], cipher[0])
+ // dialer = transport.Dial
+ // } else {
+ // log.Errorf("shadow transport missing cipher argument: %s", args)
+ // socksReq.Reply(socks5.ReplyGeneralFailure)
+ // return
+ // }
+ // } else {
+ // log.Errorf("shadow transport missing password argument: %s", args)
+ // socksReq.Reply(socks5.ReplyGeneralFailure)
+ // return
+ // }
+ // case "Optimizer":
+ // if _, ok := args["transports"]; ok {
+ // if strategyName, ok2 := args["strategy"]; ok2 {
+ // var strategy Optimizer.Strategy = nil
+ // switch strategyName[0] {
+ // case "first":
+ // strategy = Optimizer.NewFirstStrategy()
+ // case "random":
+ // strategy = Optimizer.NewRandomStrategy()
+ // case "rotate":
+ // strategy = Optimizer.NewRotateStrategy()
+ // case "track":
+ // strategy = Optimizer.NewTrackStrategy()
+ // case "min":
+ // strategy = Optimizer.NewMinimizeDialDuration()
+ // }
+ //transports := []Optimizer.Transport{}
+ //transport := Optimizer.NewOptimizerClient(transports, strategy)
+ // return transport, nil
+ ////says too many arguments to return just like earlier.
+ // } else {
+ // log.Errorf("Optimizer transport missing transports argument: %s", args)
+ // socksReq.Reply(socks5.ReplyGeneralFailure)
+ // return
+ // }
+ //} else {
+ // log.Errorf("Optimizer transport missing strategy argument: %s", args)
+ // socksReq.Reply(socks5.ReplyGeneralFailure)
+ // return
+ //}
+
default:
log.Errorf("Unknown transport: %s", name)
socksReq.Reply(socks5.ReplyGeneralFailure)