mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
feat(local): local-tun Windows README
This commit is contained in:
@@ -407,6 +407,7 @@ Redirects connections with `iptables` configurations to the port that `sslocal`
|
||||
|
||||
- Linux, Android
|
||||
- macOS, iOS
|
||||
- Windows
|
||||
|
||||
#### Linux
|
||||
|
||||
@@ -431,6 +432,14 @@ sslocal --protocol tun -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --outbo
|
||||
|
||||
It will create a Tun interface with address `10.255.0.1` and netmask `255.255.255.0`.
|
||||
|
||||
#### Windows
|
||||
|
||||
Download `wintun.dll` from [Wintun](https://www.wintun.net/), and place it in the folder with shadowsocks' runnable binaries, or in the system PATH.
|
||||
|
||||
```powershell
|
||||
sslocal --protocol tun -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --outbound-bind-interface "Loopback" --tun-interface-name "shadowsocks"
|
||||
```
|
||||
|
||||
### Local client for Windows Service
|
||||
|
||||
Compile it by enabling `--features "winservice"` (not included in the default build):
|
||||
|
||||
@@ -388,7 +388,11 @@ impl TcpTun {
|
||||
&& !socket.may_recv()
|
||||
&& !matches!(
|
||||
socket.state(),
|
||||
TcpState::SynReceived | TcpState::Established | TcpState::FinWait1 | TcpState::FinWait2
|
||||
TcpState::Listen
|
||||
| TcpState::SynReceived
|
||||
| TcpState::Established
|
||||
| TcpState::FinWait1
|
||||
| TcpState::FinWait2
|
||||
)
|
||||
{
|
||||
trace!("closed TCP Read Half, {:?}", socket.state());
|
||||
|
||||
Reference in New Issue
Block a user