YtFlow / Maple

A lightweight Universal Windows proxy app based on https://github.com/eycorsican/leaf
Apache License 2.0
1.19k stars 121 forks source link

支持非tun运行吗? #29

Open l-we opened 2 years ago

l-we commented 2 years ago

想用普通的进程方式运行,既监听 socks 和 http, 但是没有合适的 Windows GUI 程序。

bdbai commented 2 years ago

Maple 是基于 VPN 平台运行的,需要连接上 VPN 才能工作。也许可以在配置没有启用 tun 的情况下,连接 VPN 但不添加路由?如果这个方案对你来说可以的话,后续可以添加支持。

l-we commented 2 years ago

可以尝试一下,理论不添加路由相当于直连了,不知道会不会有其他影响,

bdbai commented 1 year ago

调了一通,发现 UWP 是没办法监听 loopback 地址的,启用 LoopbackExempt 也不可行。https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh780593(v=win.10) 这里提到

Note Loopback is permitted only for development purposes. Usage by a Windows Runtime app installed outside of Visual Studio is not permitted. Further, a Windows Runtime app can use an IP loopback only as the target address for a client network request. So a Windows Runtime app that uses a DatagramSocket or StreamSocketListener to listen on an IP loopback address is prevented from receiving any incoming packets.

以及参考这个回答: https://stackoverflow.com/a/50324363

BestOwl commented 1 year ago

也许可以试试这个 https://docs.microsoft.com/en-us/windows/iot-core/develop-your-app/loopback

The localhost inbound loopback policy for Windows IoT Core must be enabled for UWP apps that implement servers. This policy is controlled by the following registry key: [HKEY_LOCAL_MACHINE\system\currentcontrolset\services\mpssvc\parameters] "IoTInboundLoopbackPolicy"=dword:00000001

不知道是否适用于桌面版的 Win10/11

KexyBiscuit commented 1 year ago

@BestOwl 我印象里是不能的