Skip to content

Commit 6d9678a

Browse files
committed
README for introducing sswinservice
1 parent 68e9306 commit 6d9678a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,30 @@ sslocal --protocol tun -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --outbo
431431

432432
It will create a Tun interface with address `10.255.0.1` and netmask `255.255.255.0`.
433433

434+
### Local client for Windows Service
435+
436+
Compile it by enabling `--features "winservice"` (not included in the default build):
437+
438+
```bash
439+
cargo build --release "sswinservice" --features "winservice"
440+
```
441+
442+
Install it as a Windows Service (PowerShell):
443+
444+
```powershell
445+
New-Service -Name "shadowsocks-local-service" `
446+
-DisplayName "Shadowsocks Local Service" `
447+
-BinaryPathName "<Path\to>\sswinservice.exe local -c <Path\to>\local_config.json"
448+
```
449+
450+
There are other ways to install `sswinservice` as a Windows Service, for example, the `sc` command.
451+
452+
As you may have noticed that the `-BinaryPathName` contains not only just the `sswinservice.exe`, but `local -c local_config.json`. These command line parameters will be used as the default parameter when the Windows Service starts. You can also start the service with customized parameters.
453+
454+
Learn more from [Microsoft's Document](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications).
455+
456+
The `sswinservice`'s parameter works exactly the same as `ssservice`. It supports `local`, `server` and `manager` subcommands.
457+
434458
### Server
435459

436460
```bash

0 commit comments

Comments
 (0)