OperatorFoundation / shapeshifter-dispatcher

Shapeshifter Dispatcher converts Pluggable Transports that implement the Go API from the Pluggable Transports 2.1 specification into proxies usable by applications. Several proxy modes are provided, including proxying of both TCP and UDP traffic.
https://OperatorFoundation.org/
MIT License
177 stars 28 forks source link

[ERROR]: obfs4 transport missing cert argument: map[] #1

Closed Mikywing closed 7 years ago

Mikywing commented 7 years ago

I posted the same question on stack exchange, but maybe here is a better place as it seems to me as a bug. If I launch the dispatcher with the following command: shapeshifter-dispatcher -server -transparent -ptversion 2 -transports obfs4 --udp -state state -bindaddr obfs4-192.168.1.74:500 -orport 127.0.0.1:1194 --enableLogging -logLevel DEBUG I get the following output:

launching
obfs4-192.168.1.74:500
Error resolving Extended OR address  missing port in address
ServerSetup obfs4-192.168.1.74:500 {[{obfs4 192.168.1.74:500 map[]}] 127.0.0.1:1194 <nil> }
bindaddr {obfs4 192.168.1.74:500 map[]}
launched false []

And the following log:

2017/04/15 13:03:57 [NOTICE]: dispatcher-0.0.7-dev - launched
2017/04/15 13:03:57 [INFO]: shapeshifter-dispatcher - initializing transparent proxy
2017/04/15 13:03:57 [INFO]: shapeshifter-dispatcher - initializing UDP transparent proxy
2017/04/15 13:03:57 [INFO]: shapeshifter-dispatcher - initializing server transport listeners
2017/04/15 13:03:57 [ERROR]: obfs4 transport missing cert argument: map[]

Strangely, using obfs2 protocol it works fine instead. Let me know if/how I can help.

integritybravery commented 7 years ago

Me too.

blanu commented 7 years ago

This is not a bug. The obfs4 transport requires a cert argument to be provided via the -options flag. This is not required for obfs2. Please look at the README example for obfs4 client, which specifies the following command line:

bin/shapeshifter-dispatcher -transparent -client -state state -target 127.0.0.1:2222 -transports obfs4 -bindaddr obfs4-127.0.0.1:443 -options '{"cert": "OfQAPDamjsRO90fDGlnZR5RNG659FZqUKUwxUHcaK7jIbERvNU8+EVF6rmdlvS69jVYrKw", "iatMode": "0"}' -logLevel DEBUG -enableLogging

As you can see, the -options flag provides the required cert argument. Please look at the README for instructions on how to get the proper cert value for your obfs4 client.

Also, we do not have a stack exchange. The github project is the only place to post issues.

zdenek-pizl commented 5 years ago

Just FYI - he was talking about -server. That means he was not able to get even the cert from first server's run.

evgen-b commented 3 years ago

Me too. - Error resolving Extended OR address "missing port in address"

c:\Program Files\OpenVPN\config\test-srv>"shapeshifter-dispatcher64.exe" -transparent -server -state state -orport 127.0.0.1:3443 -transports obfs4 -bindaddr obfs4-127.0.0.1:33443 -logLevel DEBUG -enableLogging listening on 127.0.0.1:33443

LOG: 2021/01/16 21:03:26 [INFO]: initializing transparent proxy 2021/01/16 21:03:26 [INFO]: initializing TCP transparent proxy 2021/01/16 21:03:26 [NOTICE]: dispatcher-0.0.7-dev - launched 2021/01/16 21:03:26 [INFO]: initializing server transport listeners 2021/01/16 21:03:26 [INFO]: shapeshifter-dispatcher64.exe - initializing server transport listeners 2021/01/16 21:03:26 [ERROR]: Error resolving Extended OR address "missing port in address" 2021/01/16 21:03:26 [INFO]: shapeshifter-dispatcher64.exe - accepting connections 2021/01/16 21:03:26 [INFO]: obfs4 - registered listener: [scrubbed]:33443