Skip to content

Commit

Permalink
feat(local): local-tun Windows README
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Oct 18, 2023
1 parent f735dbd commit 63f33ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ Redirects connections with `iptables` configurations to the port that `sslocal`

- Linux, Android
- macOS, iOS
- Windows

#### Linux

Expand All @@ -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):
Expand Down
6 changes: 5 additions & 1 deletion crates/shadowsocks-service/src/local/tun/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 63f33ae

Please sign in to comment.