-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
If sslocal supports to handle the specific DNS requests(e.g. specific (ip:port) UDP packets) separately(may leverage the built-in DNS capability) on TUN interface, Shadowsocks-android can get rid of tun2socks lib totally.
The whole ideas is:
sequenceDiagram
participant A as Browser
box Grey Shadowsock-Android
participant J as Java Code
participant R as Rust Lib
end
participant I as Internet
J->>+R: VpnService, AddDnsServer(e.g.10.10.10.2), build and getFd and send it out
R->>+J: Create Tun with FD, Notify when ready to serve
A-->>R: DNS request(system should use 10.10.10.2 as DNS Server)
R->>R: Intercept the DNS packet(UDP packet to 10.10.10.2:53) and process with built-in DNS handler
R->>J: Protect Socket
R-->>+I: DNS Request(RAW or encrypted)
I-->>+R: DNS Response(RAW or encrypted)
R-->>A: Relay DNS Response
A-->>+R: Http request
R->>R: Routing
R->>J: Protect Socket
R-->>+I: Http Request(RAW or encrypted)
I-->>+R: Http Response(RAW or encrypted)
R-->>A: Relay HTTP Response
Metadata
Metadata
Assignees
Labels
No labels