https://github.com/teddysun/xray-plugin
A SIP003 plugin based on Xray-core
https://github.com/teddysun/xray-plugin
v2ray v2ray-plugin xray xray-plugin
Last synced: 3 months ago
JSON representation
A SIP003 plugin based on Xray-core
- Host: GitHub
- URL: https://github.com/teddysun/xray-plugin
- Owner: teddysun
- License: mit
- Created: 2021-02-19T06:17:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T15:49:21.000Z (over 1 year ago)
- Last Synced: 2025-04-06T14:05:14.765Z (about 1 year ago)
- Topics: v2ray, v2ray-plugin, xray, xray-plugin
- Language: Go
- Homepage:
- Size: 195 KB
- Stars: 366
- Watchers: 12
- Forks: 64
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Yet another SIP003 plugin for shadowsocks, based on [Xray-core](https://github.com/xtls/xray-core)
## Build
* `go build`
## Usage
See command line args for advanced usages.
### Shadowsocks over websocket (HTTP)
On your server
```sh
ss-server -c config.json -p 80 --plugin xray-plugin --plugin-opts "server"
```
On your client
```sh
ss-local -c config.json -p 80 --plugin xray-plugin
```
### Shadowsocks over websocket with TLS (HTTPS)
On your server
```sh
ss-server -c config.json -p 443 --plugin xray-plugin --plugin-opts "server;tls;host=mydomain.com"
```
On your client
```sh
ss-local -c config.json -p 443 --plugin xray-plugin --plugin-opts "tls;host=mydomain.com"
```
### Shadowsocks over QUIC
On your server
```sh
ss-server -c config.json -p 443 --plugin xray-plugin --plugin-opts "server;mode=quic;host=mydomain.com"
```
On your client
```sh
ss-local -c config.json -p 443 --plugin xray-plugin --plugin-opts "mode=quic;host=mydomain.com"
```
### Shadowsocks over gRPC
On your server
```sh
ss-server -c config.json -p 443 --plugin xray-plugin --plugin-opts "server;mode=grpc"
```
On your client
```sh
ss-local -c config.json -p 443 --plugin xray-plugin --plugin-opts "mode=grpc"
```
### Shadowsocks over gRPC with TLS
On your server
```sh
ss-server -c config.json -p 443 --plugin xray-plugin --plugin-opts "server;mode=grpc;tls;host=mydomain.com"
```
On your client
```sh
ss-local -c config.json -p 443 --plugin xray-plugin --plugin-opts "tls;mode=grpc;host=mydomain.com"
```
### Issue a cert for TLS and QUIC
`xray-plugin` will look for TLS certificates signed by [acme.sh](https://github.com/acmesh-official/acme.sh) by default.
Here's some sample commands for issuing a certificate using CloudFlare.
You can find commands for issuing certificates for other DNS providers at acme.sh.
```sh
wget -O- https://get.acme.sh | sh
~/.acme.sh/acme.sh --issue --dns dns_cf -d mydomain.com
```
Alternatively, you can specify path to your certificates using option `cert` and `key`.
### Use `certRaw` to pass certificate
Instead of using `cert` to pass the certificate file, `certRaw` could be used to pass in PEM format certificate, that is the content between `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` without the line breaks.