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

What is serverAddress in NETunnelProviderProtocol confuguration? #36

Closed
simform-solutions opened this issue Nov 30, 2020 · 4 comments
Closed

Comments

@simform-solutions
Copy link

simform-solutions commented Nov 30, 2020

Hello,
I found config.serverAddress = "somebridge" in the permissionViewController.swift file.
I added the server address "127.0.0.1" there. But it disconnected. Can you please guide me what server address I need to put there to connect TOR-VPN.
Thank you!

@tladesignz
Copy link
Member

You might want to have a look at my attempt at restarting that project:

https://github.com/tladesignz/iCepa/tree/restart

It isn't working, yet, because of lacking DNS support, that's why I didn't move it to this repo, yet.

@simform-solutions
Copy link
Author

simform-solutions commented Dec 2, 2020

Hi @tladesignz ,
Thanks for your update.
Appreciated your work towards TOR!!
I just want to know thatTorController(socketHost: "127.0.0.1", port: 9050) will create TOR controller in the packetTunnelProvider class. But, When I try to connect this TorController, it gives me this error. Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
Do you have any idea about it?

@tladesignz
Copy link
Member

I just want to know thatTorController(socketHost: "127.0.0.1", port: 9050) will create TOR controller in the packetTunnelProvider class. But, When I try to connect this TorController, it gives me this error. Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"

The host and port you give TorController needs to be the address, Tor is listening on (typically localhost) and the configured control port. The control port is where you talk to Tor to change its configuration.

So, you need to first start Tor and configure it correctly. Then wait a little (less than a second will be enough), then start the TorController.

When that's successful, you can query the TorController for Tor's status and change its configuration.

See

https://github.com/tladesignz/iCepa/blob/21e3c75512376f66ff3f7e535a060767782e2c6a/TorVPN/BasePTProvider.swift#L41-L48

https://github.com/tladesignz/iCepa/blob/21e3c75512376f66ff3f7e535a060767782e2c6a/TorVPN/BasePTProvider.swift#L144

https://github.com/tladesignz/iCepa/blob/21e3c75512376f66ff3f7e535a060767782e2c6a/TorVPN/BasePTProvider.swift#L152

https://github.com/tladesignz/iCepa/blob/21e3c75512376f66ff3f7e535a060767782e2c6a/TorVPN/BasePTProvider.swift#L185-L187

@tladesignz
Copy link
Member

To be honest: This is not a Tor support forum. If you have difficulty understanding the different concepts of Tor, I very much recommend reading all about Tor on their page: https://2019.www.torproject.org/docs/documentation.html.en

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