Can't bind to specific addresses
dessalines opened this issue · comments
panic: listen udp4 192.168.50.68:6881: bind: cannot assign requested address
goroutine 1 [running]:
main.(*torsniff).run(0xc4200761e0)
/Users/iTorm/go/src/github.com/fanpei91/torsniff/torsniff.go:170 +0x189
main.main.func1(0xc42009c000, 0xc420076190, 0x0, 0x5, 0x0, 0x0)
/Users/iTorm/go/src/github.com/fanpei91/torsniff/torsniff.go:278 +0x304
github.com/fanpei91/torsniff/vendor/github.com/spf13/cobra.(*Command).execute(0xc42009c000, 0xc42007a010, 0x5, 0x5, 0xc42009c000, 0xc42007a010)
/Users/iTorm/go/src/github.com/fanpei91/torsniff/vendor/github.com/spf13/cobra/command.go:762 +0x475
github.com/fanpei91/torsniff/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42009c000, 0x61877d, 0x13, 0xc420082460)
/Users/iTorm/go/src/github.com/fanpei91/torsniff/vendor/github.com/spf13/cobra/command.go:852 +0x334
github.com/fanpei91/torsniff/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42009c000, 0xc420072238, 0x61602c)
/Users/iTorm/go/src/github.com/fanpei91/torsniff/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
/Users/iTorm/go/src/github.com/fanpei91/torsniff/torsniff.go:289 +0x5bf
This problem occurs when your host has no the NIC that refers to 192.168.50.68.
I'm using a VPN where my internal NIC doesn't know what my actual IP is anyway.