diff options
Diffstat (limited to 'modes/stun_udp/stun_udp.go')
-rw-r--r-- | modes/stun_udp/stun_udp.go | 8 |
1 files changed, 6 insertions, 2 deletions
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"] |