Quantcast
Channel: 看得透又看得远者prevail.ppt.cc/flUmLx ppt.cc/fqtgqx ppt.cc/fZsXUx ppt.cc/fhWnZx ppt.cc/fnrkVx ppt.cc/f2CBVx
Viewing all articles
Browse latest Browse all 20483

tun2socks

$
0
0
A tun2socks framework with Swift wrapper 

Build Status GitHub release Carthage compatible GitHub license
tun2socks is designed to work with the NetworkExtension framework. It is based on the latest stable lwip with minimal modification.

Feature

The whole stack is based on GCD which is efficient and fast.
Only TCP protocol is supported.
All other protocols (UDP, ICMP, IGMP, ...) will not be supported since they are stateless or can not be supported in NetworkExtension.

Usage

The overall structure of tun2socks:
╔═══════════════════════╗                                                       
║sourceAddress: X.X.X.X ║
║ sourcePort: XX ║ writeData(_:)
╚═══════════════════════╝ │
│ ┌──────────────┐
┌─────────────┐ ┌───────┐ ┌────────────┐ ┌──────▼──────┐ │TSTCPSocketDel│
│ Local ◀──▶ TUN ◀──▶ TSIPStack ◀──▶ TSTCPSocket ├─────▶egate.didReadD│
└─────────────┘ └───────┘ └────────────┘ └─────────────┘ │ ata() │
└──────────────┘
Fully documented API reference can be found here.
Carthage is recommended to integrate tun2socks by adding
github "zhuhaow/tun2socks"
to the Cartfile.
Another alternative may be NEKit which uses tun2socks and provides many features to build a proxy app.
from https://github.com/zhuhaow/tun2socks

Viewing all articles
Browse latest Browse all 20483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>