diff options
author | Ruben Pollan <meskio@sindominio.net> | 2019-08-15 17:56:34 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2019-08-16 22:58:51 +0200 |
commit | e26305eb7b2cf037fc85486adf767b1147f07e1f (patch) | |
tree | 4243f6368c9b9145de6654db9ffdbd562ff6b852 /pkg/standalone | |
parent | 46fec47689b990a56c366b81e47d8f28eac0d413 (diff) |
[feat] get the shapeshifter errors into the log
Diffstat (limited to 'pkg/standalone')
-rw-r--r-- | pkg/standalone/vpn.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/standalone/vpn.go b/pkg/standalone/vpn.go index e593f59..4682a47 100644 --- a/pkg/standalone/vpn.go +++ b/pkg/standalone/vpn.go @@ -70,6 +70,7 @@ func (b *Bitmask) startTransport() (proxy string, err error) { Target: gw.IPAddress + ":" + gw.Ports[0], SocksAddr: proxy, } + go b.listenShapeErr() if iatMode, ok := gw.Options["iat-mode"]; ok { b.shapes.IatMode, err = strconv.Atoi(iatMode) if err != nil { @@ -86,6 +87,17 @@ func (b *Bitmask) startTransport() (proxy string, err error) { return "", fmt.Errorf("No working gateway for transport %s: %v", b.transport, err) } +func (b *Bitmask) listenShapeErr() { + ch := b.shapes.GetErrorChannel() + for { + err, more := <-ch + if !more { + return + } + log.Printf("Error from shappeshifter: %v", err) + } +} + func (b *Bitmask) startOpenVPN(proxy string) error { certPemPath, err := b.getCert() if err != nil { |