Skip to content

Commit

Permalink
README for introducing sswinservice
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Sep 23, 2023
1 parent 68e9306 commit 6d9678a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,30 @@ 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`.

### Local client for Windows Service

Compile it by enabling `--features "winservice"` (not included in the default build):

```bash
cargo build --release "sswinservice" --features "winservice"
```

Install it as a Windows Service (PowerShell):

```powershell
New-Service -Name "shadowsocks-local-service" `
-DisplayName "Shadowsocks Local Service" `
-BinaryPathName "<Path\to>\sswinservice.exe local -c <Path\to>\local_config.json"
```

There are other ways to install `sswinservice` as a Windows Service, for example, the `sc` command.

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.

Learn more from [Microsoft's Document](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications).

The `sswinservice`'s parameter works exactly the same as `ssservice`. It supports `local`, `server` and `manager` subcommands.

### Server

```bash
Expand Down

0 comments on commit 6d9678a

Please sign in to comment.