Jigsaw-Code / outline-sdk

SDK to build network tools based on Outline components.
https://getoutline.org/for-developers/
Apache License 2.0
326 stars 47 forks source link

no route to anywhere after I run the CLI #301

Open sasanmcp opened 1 week ago

sasanmcp commented 1 week ago

I have a functional outline server which works for both android and windows client. when I try to run the same key using outline-cli, it gets connected however there is no route to anywhere. I can't ping 8.8.8.8, nor anywhere else. I see an interface in linux if I run ifconfig but I don't see anything in my route -n. no DNS resolution, nothing works.

jyyi1 commented 1 week ago

Hi @sasanmcp , thanks for reporting the issue.

Feel free to review the routing logic code: https://github.com/Jigsaw-Code/outline-sdk/blob/main/x/examples/outline-cli/routing_linux.go

And here is a more detailed explanation of the logic: https://github.com/Jigsaw-Code/outline-sdk/issues/138#issuecomment-1854796842.

sasanmcp commented 1 week ago

so what should I do? the point is it is not working for me and whenever I make the connection all communication cease to work. are there set of logs or something that I can post here that would help you help me?

also I don't know how to end a connection. it is not documented in the Readme.

jyyi1 commented 3 days ago

Unfortunately, this is a developer tool, so we don't have a log of documentation or logs. Feel free to clone the source code and add logs to it: https://github.com/Jigsaw-Code/outline-sdk/blob/main/x/examples/outline-cli/routing_linux.go

To end a connection, just press Ctrl+C, the logic is also in the code.

Also, you may use Wireshark to inspect the packets in the system. (Remember to filter by 'any' network interface)

ip tuntap and ip route are useful commands to help you inspect the system routing tables. For DNS issues, double check /etc/resolv.conf or any other related files to make sure it is not a local resolver. (Behaviors will be different, depending on which DNS system you are using, e.g. dnsmasq or resolvd, NetworkManager might also have impact on this)

We need more information in order to troubleshoot the issue because there are too many Linux distros with different network/DNS configurations. Please provide as much information as possible.

And of course, we strongly recommend people to take a look at the code, and make contributions. It helps you learn how you can write your own anti-circumvention tools using Outline SDK.