diff options
author | Robin Tarsiger <rtarsiger@dasyatidae.com> | 2016-04-03 15:00:29 -0500 |
---|---|---|
committer | Robin Tarsiger <rtarsiger@dasyatidae.com> | 2016-04-03 15:14:06 -0500 |
commit | 6cb9b5a231d7f41e409daa012ee7d50a52c65daa (patch) | |
tree | 29086c7eb124b8da43d21dca46920329b18b3a6e | |
parent | 99f24043130d8b3c5cf098371e23c64abffef385 (diff) |
Split "proxies" into "proxy_dialers" and "modes"
Half of the packages in there registered dialer types with golang.org/x/net/proxy,
and half of them were proxying modes for the program as a whole. These are separate
things, so move them into separate directories.
-rw-r--r-- | modes/pt_socks5/pt_socks5.go (renamed from proxies/proxy_socks5/proxy_socks5.go) | 2 | ||||
-rw-r--r-- | modes/transparent_tcp/transparent_tcp.go (renamed from proxies/proxy_transparent/proxy_transparent.go) | 2 | ||||
-rw-r--r-- | modes/transparent_udp/transparent_udp.go (renamed from proxies/proxy_transparent_udp/proxy_transparent_udp.go) | 2 | ||||
-rw-r--r-- | obfs4proxy/obfs4proxy.go | 18 | ||||
-rw-r--r-- | proxy_dialers/proxy_http/proxy_http.go (renamed from proxies/proxy_http/proxy_http.go) | 0 | ||||
-rw-r--r-- | proxy_dialers/proxy_socks4/proxy_socks4.go (renamed from proxies/proxy_socks4/proxy_socks4.go) | 0 |
6 files changed, 12 insertions, 12 deletions
diff --git a/proxies/proxy_socks5/proxy_socks5.go b/modes/pt_socks5/pt_socks5.go index a893645..579124f 100644 --- a/proxies/proxy_socks5/proxy_socks5.go +++ b/modes/pt_socks5/pt_socks5.go @@ -27,7 +27,7 @@ // Go language Tor Pluggable Transport suite. Works only as a managed // client/server. -package proxy_socks5 +package pt_socks5 import ( "fmt" diff --git a/proxies/proxy_transparent/proxy_transparent.go b/modes/transparent_tcp/transparent_tcp.go index 1f93a46..0f27e3f 100644 --- a/proxies/proxy_transparent/proxy_transparent.go +++ b/modes/transparent_tcp/transparent_tcp.go @@ -27,7 +27,7 @@ // Go language Tor Pluggable Transport suite. Works only as a managed // client/server. -package proxy_transparent +package transparent_tcp import ( "fmt" diff --git a/proxies/proxy_transparent_udp/proxy_transparent_udp.go b/modes/transparent_udp/transparent_udp.go index 7e4d118..500cd55 100644 --- a/proxies/proxy_transparent_udp/proxy_transparent_udp.go +++ b/modes/transparent_udp/transparent_udp.go @@ -27,7 +27,7 @@ // Go language Tor Pluggable Transport suite. Works only as a managed // client/server. -package proxy_transparent_udp +package transparent_udp import ( "fmt" diff --git a/obfs4proxy/obfs4proxy.go b/obfs4proxy/obfs4proxy.go index 10fb013..6673713 100644 --- a/obfs4proxy/obfs4proxy.go +++ b/obfs4proxy/obfs4proxy.go @@ -44,9 +44,9 @@ import ( "github.com/OperatorFoundation/obfs4/common/termmon" "github.com/OperatorFoundation/obfs4/transports" - "github.com/OperatorFoundation/obfs4/proxies/proxy_socks5" - "github.com/OperatorFoundation/obfs4/proxies/proxy_transparent" - "github.com/OperatorFoundation/obfs4/proxies/proxy_transparent_udp" + "github.com/OperatorFoundation/obfs4/modes/pt_socks5" + "github.com/OperatorFoundation/obfs4/modes/transparent_tcp" + "github.com/OperatorFoundation/obfs4/modes/transparent_udp" ) const ( @@ -119,14 +119,14 @@ func main() { if *target == "" { log.Errorf("%s - transparent mode requires a target", execName) } else { - launched = proxy_transparent_udp.ClientSetup(termMon, *target) + launched = transparent_udp.ClientSetup(termMon, *target) } } else { log.Infof("%s - initializing server transport listeners", execName) if *bindAddr == "" { fmt.Println("%s - transparent mode requires a bindaddr", execName) } else { - launched = proxy_transparent_udp.ServerSetup(termMon, *bindAddr) + launched = transparent_udp.ServerSetup(termMon, *bindAddr) fmt.Println("launched", launched, ptListeners) } } @@ -137,14 +137,14 @@ func main() { if *target == "" { log.Errorf("%s - transparent mode requires a target", execName) } else { - launched, ptListeners = proxy_transparent.ClientSetup(termMon, *target) + launched, ptListeners = transparent_tcp.ClientSetup(termMon, *target) } } else { log.Infof("%s - initializing server transport listeners", execName) if *bindAddr == "" { fmt.Println("%s - transparent mode requires a bindaddr", execName) } else { - launched, ptListeners = proxy_transparent.ServerSetup(termMon, *bindAddr) + launched, ptListeners = transparent_tcp.ServerSetup(termMon, *bindAddr) fmt.Println("launched", launched, ptListeners) } } @@ -154,10 +154,10 @@ func main() { log.Infof("%s - initializing PT 1.0 proxy", execName) if isClient { log.Infof("%s - initializing client transport listeners", execName) - launched, ptListeners = proxy_socks5.ClientSetup(termMon) + launched, ptListeners = pt_socks5.ClientSetup(termMon) } else { log.Infof("%s - initializing server transport listeners", execName) - launched, ptListeners = proxy_socks5.ServerSetup(termMon) + launched, ptListeners = pt_socks5.ServerSetup(termMon) } } diff --git a/proxies/proxy_http/proxy_http.go b/proxy_dialers/proxy_http/proxy_http.go index cbca64a..cbca64a 100644 --- a/proxies/proxy_http/proxy_http.go +++ b/proxy_dialers/proxy_http/proxy_http.go diff --git a/proxies/proxy_socks4/proxy_socks4.go b/proxy_dialers/proxy_socks4/proxy_socks4.go index 4e67f46..4e67f46 100644 --- a/proxies/proxy_socks4/proxy_socks4.go +++ b/proxy_dialers/proxy_socks4/proxy_socks4.go |