TUN inbound: Enhance Darwin interface support#5598
Conversation
2a6b7f4 to
85634cd
Compare
|
#5559 (comment) 提到简单改一下就能在 iOS 上跑,可以并入这个 PR @evozi-team 测试一下这个 PR 对于 iOS 有改进吗 |
|
I was planning to check how this can be extended for iOS support as a next step. |
|
|
|
可以先 rebase 445c0d4 ,方便 @evozi-team 测下 iOS |
|
现在的 TUN 还剩个 macOS 上的进程名路由 #5559 (comment) 和三个平台上的 auto-toute #5594 (comment) 就差不多了
|
85634cd to
474ee62
Compare
|
I've investigated the iOS support. This all sounds to me, like to have real iOS support I need to see at least one real life implementation of an iOS app that uses XRay-Core as that kind of "bind" application/library. Besides that the darwin/macos enhancement, which also includes unification with windows enpoint (because they really work similar), is done in this pull request. |
|
Rebase 一下吧,ready 了就合并 |
fad419e to
8917beb
Compare
|
Rebased on top of main. |
|
|
- reduce number of actions done to create/configure the interface in the system - assign synthetic static link-local ipv4/ipv6 addresses to the interface, that are required by the OS for the routing to work - make tun_darwin_endpoint be implemented significantly more similar to tun_windows_enpoint, preparing them for potential unification
…milar, into one GVisorEndpoint. Making darwin/windows tun implement GVisorDevice with simple readpacket/writepacket methods that GVisorEndpoint untilise
8917beb to
fae956f
Compare
|
|
|
@Owersun is it possible to have split tunneling with this on macOS? I'm not a network guy but I tried to do my best. This is what I did (en1 here is my Wi-Fi interface):
In my xray config, I have added |
|
Hey. I think you always need step 1. I'll try to investigate the topic about are there ways to have like multiple routing tables in MacOSX, like linux has, but recently dealing with it's network stack I doubt they cared about that... I'll write here what I found. |
PR iOS 5612 内存不会一直往下掉了,可用内存稳定在20-30mb之间。 |
What I saw is that people add this trying to contain the iOS constraints: |
|
|
|
|
If you have few back traces and reasons of crashes that point to golang tun part, so its clear that it happens because of that code, I can think about why it could be happening. |
* commit 'f6a7e939231e5ec6b167628bf730dc70a3c36707': (90 commits) VMess inbound: Optimize replay filter (XTLS#5562) Bump github.com/pires/go-proxyproto from 0.9.1 to 0.9.2 (XTLS#5614) TUN inbound: Add iOS support (XTLS#5612) Geodat: Reduce peak memory usage (XTLS#5581) Bump github.com/pires/go-proxyproto from 0.9.0 to 0.9.1 (XTLS#5608) Hysteria transport: Support range & random for `interval` in `udphop` as well (XTLS#5603) TUN inbound: Enhance Darwin interface support (XTLS#5598) XUDP client: Initialize Global ID's BaseKey correctly (XTLS#5602) TUN inbound: Disable RACK/TLP recovery to fix connection stalls (XTLS#5600) v26.1.23 common/errors/feature_errors.go: Add PrintNonRemovalDeprecatedFeatureWarning() (XTLS#5567) API: Add ListRule() for routing (XTLS#5569) Log config: More flexible `maskAddress` (XTLS#5570) Bump github.com/miekg/dns from 1.1.70 to 1.1.72 (XTLS#5590) Bump github.com/cloudflare/circl from 1.6.2 to 1.6.3 (XTLS#5589) Hysteria transport: Fix speedtest issue (XTLS#5587) README.md: Add fancyss to Asuswrt-Merlin Clients Router: Fix panic in ProcessNameMatcher when source IPs are empty (XTLS#5574) README.md: Update links for PassWall & PassWall 2 (XTLS#5572) Tests: Reduce RAM usage (XTLS#5577) ... # Conflicts: # core/core.go
Hi, thanks for your reply. I want to let you know I have achieved split-tunneling with a little trick.
With these routes, the freedom outbound is accessible and there is also no need to add the VLESS host route. As you have probably guessed, the trick is in avoiding |
I checked the functionality on my local machine to work, checking every element make sense, and functions call proper ioctl's.