feat(local): local-tun Windows README

This commit is contained in:
zonyitoo
2023-10-18 23:00:38 +08:00
parent f735dbdae1
commit 63f33aeb86
2 changed files with 14 additions and 1 deletions

View File

@@ -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):

View File

@@ -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());