summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2019-08-15 17:56:34 +0200
committerRuben Pollan <meskio@sindominio.net>2019-08-16 22:58:51 +0200
commite26305eb7b2cf037fc85486adf767b1147f07e1f (patch)
tree4243f6368c9b9145de6654db9ffdbd562ff6b852
parent46fec47689b990a56c366b81e47d8f28eac0d413 (diff)
[feat] get the shapeshifter errors into the log
-rw-r--r--pkg/standalone/vpn.go12
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 {