mirror of
https://github.com/v2fly/v2ray-examples.git
synced 2025-11-26 22:55:38 +08:00
根据v5版本现有文档添加配置
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
# 这是一个使用 V2Ray 作为 ss + v2ray plugin 服务端的示例
|
||||
|
||||
> 完整的设置还需要一个 web 服务器解密 TLS 后,将请求转发给位于 127.0.0.1:10000 的 v2ray。由于 [https://guide.v2fly.org/advanced/wss_and_web.html#%E9%85%8D%E7%BD%AE](https://guide.v2fly.org/advanced/wss_and_web.html#%E9%85%8D%E7%BD%AE) 已经有了服务器的设置这里不再赘述,可以按需参考白话文教程里的 web 服务器设置。
|
||||
|
||||
config_server_redirect.json 和 config_server_domainsocket.json 选其一。
|
||||
|
||||
如果使用 domain socket 需要修改`/etc/systemd/system/v2ray.service`。否则由于 fhs 脚本使用的 nobody 用户的权限不够,无法在/var/run 里新建文件夹`ss-loop`而导致启动失败。
|
||||
|
||||
> 如果使用 fhs 脚本更新版本的话,会覆盖掉 service 文件,所以更新版本后需要重复下面的操作。
|
||||
|
||||
修改文件`/etc/systemd/system/v2rary.service`,在`[Service]`部分添加下面一行:
|
||||
|
||||
```properties
|
||||
RuntimeDirectory=ss-loop
|
||||
```
|
||||
|
||||
`ss-loop`对应 config.json 里的`dsSettings`部分的 path 里的文件夹`/var/run/ss-loop`
|
||||
|
||||
修改完成后需要执行
|
||||
|
||||
```shell
|
||||
systemctl disable v2ray.service
|
||||
systemctl enable v2ray.service
|
||||
```
|
||||
|
||||
最后重启下 v2ray 进程
|
||||
|
||||
```shell
|
||||
systemctl restart v2ray
|
||||
```
|
||||
|
||||
## 客户端配置示意
|
||||
|
||||
你应该按照服务端的设置修改对应的参数
|
||||
|
||||
### shadowsocks windows 客户端关键部分示例如下
|
||||
|
||||
```properties
|
||||
Server_IP: example.com or your server ip
|
||||
Server_Port: 443
|
||||
Password: ifYouWantToKeepYourPassphraseSafeChangeThis!!
|
||||
Encryption: chacha20-ietf-poly1305
|
||||
Plugin_Program: pathToYourV2ray-plugin_windows_arch.exe
|
||||
Plugin_Options: tls;mode=websocket;path=/michi;host=example.com
|
||||
```
|
||||
|
||||
### shadowsocks Android plugin 关键部分示例如下
|
||||
|
||||
需安装 shadowsocks 和 v2ray plugin,并搭配一同使用
|
||||
|
||||
```properties
|
||||
Plugin: v2ray
|
||||
Configuration:
|
||||
Transport_mode: websocket-tls
|
||||
Hostname: example.com
|
||||
Path: /michi
|
||||
Concurrent_connections: 1
|
||||
Certificate_for_TLS_verification: Not set
|
||||
```
|
||||
@@ -0,0 +1,63 @@
|
||||
# This is the server config.json example to utilizing V2ray as the server for Shadowsocks + V2Ray Plugin
|
||||
|
||||
> The complete setup also requires a web server to handle the TLS and proxy pass the deciphered request to the backend v2ray server at 127.0.0.1:10000.
|
||||
> You can find the web server config example at [https://guide.v2fly.org/en_US/advanced/wss_and_web.html#server-side-configuration](https://guide.v2fly.org/en_US/advanced/wss_and_web.html#server-side-configuration).
|
||||
|
||||
中文用户请看[这里](./README-CN.md)。
|
||||
|
||||
Choose one of the server config `config_server_redirect.json` and `config_server_domainsocket.json`.
|
||||
|
||||
If you choose to use `config_server_domainsocket.json`, the following extra steps are required. Since the default service file created by [`fhs-release.sh`](https://github.com/v2fly/fhs-install-v2ray) is using nobody as the runtime user, this user does not have the permission to create the `ss-loop` folder in `/var/run`.
|
||||
|
||||
> You shall repeat the following steps after using [`fhs-release.sh`](https://github.com/v2fly/fhs-install-v2ray) scripts to upgrade v2ray-core versions each time. Since this script will always override the v2ray.service file.
|
||||
|
||||
Use your prefered editor to modify the systemd service file at `/etc/systemd/system/v2ray.service`.\
|
||||
Add the following line to the block starting with `[Service]`.
|
||||
|
||||
```properties
|
||||
RuntimeDirectory=ss-loop
|
||||
```
|
||||
|
||||
`ss-loop` corresponds to the `/var/run/ss-loop` folder in the `dsSettings` inside config_server_domainsocket.json.
|
||||
|
||||
Execute the following commands to re-enable the v2ray.service.
|
||||
|
||||
```shell
|
||||
systemctl disable v2ray.service
|
||||
systemctl enable v2ray.service
|
||||
```
|
||||
|
||||
Then restart the v2ray service.
|
||||
|
||||
```shell
|
||||
systemctl restart v2ray
|
||||
```
|
||||
|
||||
## Client configuration examples
|
||||
|
||||
> You should change the following configurations according to your server configs.
|
||||
|
||||
### shadowsocks windows client configuration examples
|
||||
|
||||
```properties
|
||||
Server_IP: example.com or your server IP
|
||||
Server_Port: 443
|
||||
Password: ifYouWantToKeepYourPassphraseSafeChangeThis!!
|
||||
Encryption: chacha20-ietf-poly1305
|
||||
Plugin_Program: pathToYourV2ray-plugin_windows_arch.exe
|
||||
Plugin_Options: tls;mode=websocket;path=/michi;host=example.com
|
||||
```
|
||||
|
||||
### shadowsocks Android plugin configuration examples
|
||||
|
||||
> Both the shadowsocks android and the V2Ray plugin android are mandatory, they are available on Google Play Store.
|
||||
|
||||
```properties
|
||||
Plugin: v2ray
|
||||
Configuration:
|
||||
Transport_mode: websocket-tls
|
||||
Hostname: example.com
|
||||
Path: /michi
|
||||
Concurrent_connections: 1
|
||||
Certificate_for_TLS_verification: Not set
|
||||
```
|
||||
35
V5-Shadowsocks-Websocket-Web-TLS/README-CN.md
Normal file
35
V5-Shadowsocks-Websocket-Web-TLS/README-CN.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# 这个例子同样适用于 Shadowsocks 客户端+V2Ray-Plugins
|
||||
|
||||
> 完整的设置还需要一个 web 服务器解密 TLS 后,将请求转发给监听在 127.0.0.1:10000 的 v2ray。由于 [https://guide.v2fly.org/advanced/wss_and_web.html#%E9%85%8D%E7%BD%AE](https://guide.v2fly.org/advanced/wss_and_web.html#%E9%85%8D%E7%BD%AE) 已经有了服务器的设置这里不再赘述,可以按需参考白话文教程里的 web 服务器设置。
|
||||
|
||||
## 客户端配置示意
|
||||
|
||||
你应该按照服务端的设置修改对应的参数。
|
||||
|
||||
### shadowsocks windows 客户端关键部分示例如下
|
||||
|
||||
> 必须设置 mux=0,否则无法正常连接服务器。如果需要使用 mux 可以参考本文件夹里的[Domainsocket or Redirect Approach](./Domainsocket-or-Redirect-Approach/)的方法。
|
||||
|
||||
```properties
|
||||
Server_IP: example.com or your server ip
|
||||
Server_Port: 443
|
||||
Password: ifYouWantToKeepYourPassphraseSafeChangeThis!!
|
||||
Encryption: chacha20-ietf-poly1305
|
||||
Plugin_Program: pathToYourV2ray-plugin_windows_arch.exe
|
||||
Plugin_Options: mux=0;tls;mode=websocket;path=/path;host=example.com
|
||||
```
|
||||
|
||||
### Shadowsocks Android plugin 关键部分示例如下
|
||||
|
||||
> 需安装 shadowsocks 和 v2ray plugin,并搭配一同使用。
|
||||
> Concurrent connections 必须为 0,否则无法连接到服务器。
|
||||
|
||||
```properties
|
||||
Plugin: v2ray
|
||||
Configuration:
|
||||
Transport_mode: websocket-tls
|
||||
Hostname: example.com
|
||||
Path: /path
|
||||
Concurrent_connections: 0
|
||||
Certificate_for_TLS_verification: Not set
|
||||
```
|
||||
38
V5-Shadowsocks-Websocket-Web-TLS/README.md
Normal file
38
V5-Shadowsocks-Websocket-Web-TLS/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# These settings are also compatible with Shadowsocks client + V2Ray-plugin
|
||||
|
||||
> The complete setup also requires a web server to handle the TLS and proxy pass the deciphered request to the backend v2ray server listeing on 127.0.0.1:10000.
|
||||
> You can find the web server config examples at [https://guide.v2fly.org/en_US/advanced/wss_and_web.html#server-side-configuration](https://guide.v2fly.org/en_US/advanced/wss_and_web.html#server-side-configuration).
|
||||
|
||||
中文用户请看[这里](./README-CN.md)。
|
||||
|
||||
## Shadowsocks client configuration examples
|
||||
|
||||
> You should change the following configurations according to your server configs.
|
||||
|
||||
### Shadowsocks windows client configuration examples
|
||||
|
||||
> `mux=0` is indispensable when connecting with V2Ray-plugin, if you wish to use mux you need to try the [Domainsocket or Redirect Approach](./Domainsocket-or-Redirect-Approach/).
|
||||
|
||||
```properties
|
||||
Server_IP: example.com or your server IP
|
||||
Server_Port: 443
|
||||
Password: ifYouWantToKeepYourPassphraseSafeChangeThis!!
|
||||
Encryption: chacha20-ietf-poly1305
|
||||
Plugin_Program: pathToYourV2ray-plugin_windows_arch.exe
|
||||
Plugin_Options: mux=0;tls;mode=websocket;path=/path;host=example.com
|
||||
```
|
||||
|
||||
### shadowsocks Android plugin configuration examples
|
||||
|
||||
> Both the shadowsocks android and the V2Ray plugin android are mandatory, they are available on Google Play Store.\
|
||||
> _`Concurrent connections must be 0.`_
|
||||
|
||||
```properties
|
||||
Plugin: v2ray
|
||||
Configuration:
|
||||
Transport_mode: websocket-tls
|
||||
Hostname: example.com
|
||||
Path: /path
|
||||
Concurrent_connections: 0
|
||||
Certificate_for_TLS_verification: Not set
|
||||
```
|
||||
Reference in New Issue
Block a user