diff options
author | kwadronaut <kwadronaut@leap.se> | 2019-10-23 12:14:47 +0200 |
---|---|---|
committer | kwadronaut <kwadronaut@puscii.nl> | 2019-10-23 12:15:45 +0200 |
commit | 1f11064c46adf504e3a00fe82f66b8bd64adadb8 (patch) | |
tree | b123cecabc5c5e8af25833f473748a7aa4eb6305 | |
parent | f63f10369bad778e1fefbac862f1c752d9ca9436 (diff) | |
parent | 159de5e7e158c0621e06448c629dbb5b08f37a0e (diff) |
Merge remote-tracking branch 'meskio/new_obfs4_errors'
-rw-r--r-- | modes/pt_socks5/pt_socks5.go | 6 | ||||
-rw-r--r-- | modes/stun_udp/stun_udp.go | 8 | ||||
-rw-r--r-- | modes/transparent_tcp/transparent_tcp.go | 6 | ||||
-rw-r--r-- | modes/transparent_udp/transparent_udp.go | 6 |
4 files changed, 21 insertions, 5 deletions
diff --git a/modes/pt_socks5/pt_socks5.go b/modes/pt_socks5/pt_socks5.go index cb7c974..dae0d90 100644 --- a/modes/pt_socks5/pt_socks5.go +++ b/modes/pt_socks5/pt_socks5.go @@ -174,7 +174,11 @@ func ServerSetup(ptServerInfo pt.ServerInfo, statedir string, options string) (l transport := obfs2.NewObfs2Transport() listen = transport.Listen case "obfs4": - transport := obfs4.NewObfs4Server(statedir) + transport, err := obfs4.NewObfs4Server(statedir) + if err != nil { + log.Errorf("Can't start obfs4 transport: %v", err) + return + } listen = transport.Listen case "replicant": shargs, aok := args["Replicant"] diff --git a/modes/stun_udp/stun_udp.go b/modes/stun_udp/stun_udp.go index e6d991c..c834511 100644 --- a/modes/stun_udp/stun_udp.go +++ b/modes/stun_udp/stun_udp.go @@ -190,7 +190,7 @@ func dialConn(tracker *ConnTracker, addr string, target string, name string, opt (*tracker)[addr] = ConnState{remote, false} } -func ServerSetup(ptServerInfo pt.ServerInfo, stateDir string, options string) (launched bool, listeners []net.Listener) { +func ServerSetup(ptServerInfo pt.ServerInfo, stateDir string, options string) (launched bool, listeners []net.Listener) { fmt.Println("ServerSetup") // Launch each of the server listeners. @@ -212,7 +212,11 @@ func ServerSetup(ptServerInfo pt.ServerInfo, stateDir string, options string) ( transport := obfs2.NewObfs2Transport() listen = transport.Listen case "obfs4": - transport := obfs4.NewObfs4Server(stateDir) + transport, err := obfs4.NewObfs4Server(stateDir) + if err != nil { + log.Errorf("Can't start obfs4 transport: %v", err) + return + } listen = transport.Listen case "Replicant": shargs, aok := args["Replicant"] diff --git a/modes/transparent_tcp/transparent_tcp.go b/modes/transparent_tcp/transparent_tcp.go index 06597e0..2823e66 100644 --- a/modes/transparent_tcp/transparent_tcp.go +++ b/modes/transparent_tcp/transparent_tcp.go @@ -140,7 +140,11 @@ func ServerSetup(ptServerInfo pt.ServerInfo, statedir string, options string) (l transport := obfs2.NewObfs2Transport() listen = transport.Listen case "obfs4": - transport := obfs4.NewObfs4Server(statedir) + transport, err := obfs4.NewObfs4Server(statedir) + if err != nil { + log.Errorf("Can't start obfs4 transport: %v", err) + return false, nil + } listen = transport.Listen case "Replicant": shargs, aok := args["Replicant"] diff --git a/modes/transparent_udp/transparent_udp.go b/modes/transparent_udp/transparent_udp.go index ab0504e..dc7b6bb 100644 --- a/modes/transparent_udp/transparent_udp.go +++ b/modes/transparent_udp/transparent_udp.go @@ -230,7 +230,11 @@ func ServerSetup(ptServerInfo pt.ServerInfo, stateDir string, options string) (l transport := obfs2.NewObfs2Transport() listen = transport.Listen case "obfs4": - transport := obfs4.NewObfs4Server(stateDir) + transport, err := obfs4.NewObfs4Server(stateDir) + if err != nil { + log.Errorf("Can't start obfs4 transport: %v", err) + return + } listen = transport.Listen case "Replicant": shargs, aok := args["Replicant"] |