Jigsaw-Code / outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
https://getoutline.org/
Apache License 2.0
8.41k stars 1.36k forks source link

Windows TAP reset tutorial #368

Open sailosha opened 5 years ago

sailosha commented 5 years ago

Sometimes if the local user changed its DNS or ipconfig setting, the outline will failure to run even though you uninstall and install it again. It happened when you didn't delete windows TAP correctly. Do we need add tutorials to tell how to reset TAP and re-install outline on the windows os?

I seen this issue 3 times already.

trevj commented 5 years ago

@sailosha Good suggestion. There is definitely a case to be made for better documentation on configuring/removing the TAP device. I'd also like to automate this, mostly the uninstall part.

lgg commented 5 years ago

@trevj can't we just delete outline-tap0 adapter when uninstalling Outline?

trevj commented 5 years ago

@lgg Unfortunately, the tools bundled with tap-windows6 can only remove devices by their "hardware ID" which devices from other VPNs may share. We definitely do plan to fork/overhaul those tools at some point which would make this possible.

trevj commented 5 years ago

@sailosha I just realised that you're right, the installer currently does not try to "fix" the TAP device's subnet if the user has manually changed it. That would be straightforward and would help some users. Thanks for the suggestion.

lgg commented 5 years ago

@trevj sorry, I didn't really understand.

tap-windows6 can only remove devices by their "hardware ID" which devices from other VPNs may share

As I know: Outline Client creates TAP-adapter named 'outline-tap0' during installation, this TAP adapter is used only by Outline Client. In https://github.com/OpenVPN/tap-windows6 README:

tapinstall remove TAP0901

So I think that tapinstall remove outline-tap0 should work fine in this case. Is it right?

trevj commented 5 years ago

@lgg Yes but if you also have, for example, the OpenVPN client installed then any network devices it has created will also be removed - as they share the same hardware ID.

Unfortunately, I don't know of a way to remove just outline-tap0 via the command line. Yes, this is slightly ridiculous.

LBYPatrick commented 5 years ago

Or we may use builtin stuff on windows for removing the TAP adapters: Link

We can detect the problem and integrate an automated script in Outline and prompt users for using it)

Mac OS should have something similar since it is Unix-based.

trevj commented 5 years ago

@LBYPatrick Thanks for the tip but unfortunately I get this error:

C:\Windows\system32>netsh lan delete profile interface=outline-tap0
You do not have sufficient privileges or the profile on interface "outline-tap0" is a group policy profile.