diff options
author | Ruben Pollan <meskio@sindominio.net> | 2019-10-22 14:02:22 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2019-10-22 14:02:22 +0200 |
commit | 159de5e7e158c0621e06448c629dbb5b08f37a0e (patch) | |
tree | 011aa4566d669cb822914ebe76f27f362f7ec0d2 /modes/stun_udp/stun_udp.go | |
parent | 7548a703e3dbbf50fc66b08d4807790c7c165fec (diff) |
Log errors initializing obfs4 transport server
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"] |