Skip to content

Commit fe84f58

Browse files
committed
docs: Add documentation for IPv6 optimization configuration
1 parent 0e50a2d commit fe84f58

File tree

2 files changed

+84
-10
lines changed

2 files changed

+84
-10
lines changed

Diff for: README.md

+41-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
该项目可以让你通过订阅的方式使用`WARP+`,支持`Clash``Shadowrocket`等客户端。项目内置了
1616
刷取`WARP+`流量的功能,可以让你的`WARP+`流量不再受限制(每`18`秒可获得`1GB`流量),同时,
17-
配备了`IP`选优功能。支持`Docker compose`一键部署,无需额外操作,即可享受你自己的`WARP+`
17+
配备了`IP`选优功能。支持`Docker compose`
18+
一键部署,无需额外操作,即可享受你自己的`WARP+`
1819
有高速节点!
1920

2021
## 💡 特色功能
@@ -30,8 +31,10 @@
3031

3132
### 1. 安装`Docker``Docker compose`
3233

33-
- `Docker`安装教程:[https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
34-
- `Docker compose`安装教程:[https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
34+
- `Docker`
35+
安装教程:[https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
36+
- `Docker compose`
37+
安装教程:[https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
3538

3639
### 2. 下载项目
3740

@@ -64,7 +67,8 @@ docker-compose up -d
6467

6568
## 🌏 手动IP选优
6669

67-
项目本身包含了一个选优过的`IP`列表,但是由于`WARP``IP`是动态的,所以可能会出现`IP`不可用的
70+
项目本身包含了一个选优过的`IP`列表,但是由于`WARP``IP`
71+
是动态的,所以可能会出现`IP`不可用的
6872
情况。若您需要手动选优,可以遵循以下步骤:
6973

7074
若您通过`docker-compose`部署,可以在项目目录下通过以下命令手动执行`IP`选优:
@@ -102,7 +106,8 @@ python3 app.py optimize
102106

103107
### 📝 配置示例
104108

105-
例如,您设置`SECRET_KEY``123456`,并打算将订阅分享给社区,那么您的`.env.local`文件应该
109+
例如,您设置`SECRET_KEY``123456`,并打算将订阅分享给社区,那么您的`.env.local`
110+
文件应该
106111
如下:
107112

108113
```env
@@ -139,6 +144,37 @@ curl -X POST http://host:port/api/account/update_license -H "Content-Type: appli
139144
请注意,当您设置了`LicenseKey`后,其`PublicKey``PrivateKey`将会被重置,需要重新获取订阅
140145
内容。
141146

147+
### 使用 IPv6 优选
148+
149+
从原理上来看,本服务通过读取`config/result_v6.csv`文件获取`IPv6`地址,因此您可以在支持
150+
`IPv6`的服务器上运行`IP`选优功能来获得`IPv6`地址。获取到的接入地址列表只需写入
151+
`config/result_v6.csv`文件中,相比在`Docker`容器中运行`IP`选优功能,此方法更为简便。
152+
153+
如果您需要在`Docker`容器中运行`IP`选优功能,可以使用`docker-compose_ipv6.yaml`
154+
文件来让`Docker`镜像支持`IPv6`。在运行前,请确保您的服务器支持`IPv6`,并在`Docker`服务的
155+
`/etc/docker/daemon.json`中添加以下内容,并重启`Docker`服务:
156+
157+
```json
158+
{
159+
"experimental": true,
160+
"ip6tables": true,
161+
"ipv6": true,
162+
"fixed-cidr-v6": "2001:db8:1::/64"
163+
}
164+
```
165+
166+
若您在先前已经运行过`Docker`服务,在运行之前,请先停止之前的服务:
167+
168+
```bash
169+
docker-compose down
170+
```
171+
172+
然后,您可以通过以下命令来运行`Docker`服务:
173+
174+
```bash
175+
docker-compose -f docker-compose_ipv6.yaml up -d
176+
```
177+
142178
## 🗂️ 引用项目
143179

144180
本项目的开发参照了以下项目,感谢这些开源项目的作者:

Diff for: README_en.md

+43-5
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,21 @@ your private high-speed `WARP+` node without extra hassle!
2525
## 💡 Key Features
2626

2727
- 💻 Supports clients such as `Clash`, `Surge`, `Shadowrocket`, etc.
28-
-
28+
-
2929
- 🔑 Supports setting your own `LicenseKey`.
3030
- 🌏 Supports IP optimization.
3131
- 🐋 Supports one-click deployment using `Docker compose`.
32-
- 📕 Automatically replenishes `WARP+` traffic, requests are proxied,
33-
preserving your IP from getting blocked.
32+
- 📕 Automatically replenishes `WARP+` traffic, requests are proxied,
33+
preserving your IP from getting blocked.
3434
- ❓ Randomly selects nodes each subscription update, adding a sense of
35-
randomness to your experience.
35+
randomness to your experience.
3636

3737
## 🚀 Quick Start
3838

3939
### 1. Install `Docker` and `Docker compose`
4040

41-
- Docker Installation Guide: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
41+
- Docker Installation
42+
Guide: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
4243
- Docker Compose Installation
4344
Guide: [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
4445

@@ -158,6 +159,43 @@ Please note that when you set the `LicenseKey`, your `PublicKey` and
158159
`PrivateKey` will be reset, and you will need to re-acquire the subscription
159160
content.
160161

162+
### Using IPv6 Preference
163+
164+
In principle, this service obtains IPv6 addresses by reading
165+
the `config/result_v6.csv` file. Therefore, you can run the IP preference
166+
function on a server that supports IPv6 to obtain IPv6 addresses. The list of
167+
obtained access addresses only needs to be written into
168+
the `config/result_v6.csv` file. Compared to running the IP preference function
169+
in a Docker container, this method is more straightforward.
170+
171+
If you need to run the IP preference function in a Docker container, you can use
172+
the `docker-compose_ipv6.yaml` file to make the Docker image support IPv6.
173+
Before running, please ensure that your server supports IPv6 and add the
174+
following content to /etc/docker/daemon.json in the Docker service (remember to
175+
restart the Docker service):
176+
177+
```json
178+
{
179+
"experimental": true,
180+
"ip6tables": true,
181+
"ipv6": true,
182+
"fixed-cidr-v6": "2001:db8:1::/64"
183+
}
184+
```
185+
186+
If you have previously run the Docker service, please stop the previous service
187+
before running:
188+
189+
```bash
190+
docker-compose down
191+
```
192+
193+
Then, you can run the Docker service with the following command:
194+
195+
```bash
196+
docker-compose -f docker-compose_ipv6.yaml up -d
197+
```
198+
161199
## 🗂️ Attribution
162200

163201
This project's development was influenced by the following projects.

0 commit comments

Comments
 (0)