Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ptadapter obfs3 and OPENVPN #11

Open
morilp opened this issue Jan 4, 2023 · 3 comments
Open

Problem with ptadapter obfs3 and OPENVPN #11

morilp opened this issue Jan 4, 2023 · 3 comments

Comments

@morilp
Copy link

morilp commented Jan 4, 2023

I want to connect with ptadapter and obfs3 to openvpn server the config files are below:

##Client config:
[client]
exec = "D:\MyApp\ptadapter_config\obfs4proxy.exe"
#state = "D:\MyApp\ptadapter_config\state"
tunnels = fn_obfs_4 fn_obfs_3
[fn_obfs_3]
transport = obfs3
listen = 127.0.0.1:3883
upstream = x.x.x.x:10113

##Server Config
[server]
exec = /usr/bin/obfs4proxy -enableLogging
state = ./state
forward = 127.0.0.1:1194
tunnels = server_obfs4 server_obfs3
[server_obfs3]
transport = obfs3
listen = 127.0.0.1:10113

i did use socks proxy on openvpn client also and after i click on connect button the below error occured on client terminal:

[2023-01-04 16:03:32,857] WARNING handler PT reported error while connecting to upstream ('x.x.x.x', 10113): PTSOCKS5ConnectError(<SOCKS5Reply.GENERAL_FAILURE: b'\x01'>)
[2023-01-04 16:03:32,859] ERROR handler Unexpected error
Traceback (most recent call last):
File "C:\Users\Mori\AppData\Roaming\Python\Python311\site-packages\ptadapter\contexts.py", line 45, in log_unhandled_exc
yield
File "C:\Users\Mori\AppData\Roaming\Python\Python311\site-packages\ptadapter\console_script.py", line 52, in handle_client_connection
async with contexts.log_unhandled_exc(handler_logger),
File "C:\Program Files\Python311\Lib\contextlib.py", line 211, in aexit
await anext(self.gen)
File "C:\Users\Mori\AppData\Roaming\Python\Python311\site-packages\ptadapter\contexts.py", line 29, in aclosing_multiple_writers
close_tasks, _ = await asyncio.wait([w.wait_closed() for w in writers])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 415, in wait
raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.
C:\Users\Mori\AppData\Roaming\Python\Python311\site-packages\ptadapter\console_script.py:52: RuntimeWarning: coroutine 'StreamWriter.wait_closed' was never awaited
async with contexts.log_unhandled_exc(handler_logger),
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Maybe its a bug idk but i have same problem when i tried obfs4 connection btw.
Tanks for your great work.

@twisteroidambassador
Copy link
Owner

Hi,

your immediate problem is that the PT cannot connect to the server, and returned an error status. Looking at your server configuration, you're listening on the loopback address 127.0.0.1, which means only clients on the same host can connect to the server. Maybe you meant to listen on the wildcard address 0.0.0.0?

There's also an error when handling the failed connection. I will look into that later.

@morilp
Copy link
Author

morilp commented Jan 5, 2023

Thank you for your answer, but I found out through the tcpdump command that my connection with the server is established and the problem is that the obfs protocols are completely blocked in my country. now idk how can i connect to freedom world :)

@twisteroidambassador
Copy link
Owner

obfs3 is probably blocked pretty thoroughly in many places. obfs4 might work better, but sophisticated nation state censors are known to discover and block them as well. The other notable pluggable transports are meek and snowflake, but I don't know whether they are self-host friendly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants