测试文章

本文最后更新于:14 小时前

这是一篇测试文章

静态博客网站生成器jekyll、hexo和hugo如何选择?有什么区别?

sudo cp /home/ec2-user/v2ray-3.05/src/* /etc/v2ray/233boy/v2ray/src/
sudo cp -rf /home/ec2-user/v2ray-3.05/config/* /etc/v2ray/233boy/v2ray/config/
sudo cp -rf /home/ec2-user/v2ray-3.05/tools/* /etc/v2ray/233boy/v2ray/tools/
sudo cp -rf /home/ec2-user/v2ray-3.05/templates/* /etc/v2ray/233boy/v2ray/templates/

ERROR: This script has been DISCARDED, please switch to fhs-install-v2ray project.
HOW TO USE: https://github.com/v2fly/fhs-install-v2ray
TO MIGRATE: https://github.com/v2fly/fhs-install-v2ray/wiki/Migrate-from-the-old-script-to-this

……….. V2Ray 一键安装脚本 & 管理脚本 by v2ray6.com ……….

帮助说明: https://v2ray6.com/post/1/

搭建教程: https://v2ray6.com/post/2/


是否配置 Shadowsocks [Y/N]
(默认 [N]): y

请输入 Shadowsocks 端口 [1-65535],不能和 V2Ray 端口相同
(默认端口: 26555):

Shadowsocks 端口 = 26555

请输入 Shadowsocks 密码

Shadowsocks 密码 = ******

请选择 Shadowsocks 加密协议 [1-7]

  1. aes-128-cfb

  2. aes-256-cfb

  3. chacha20

  4. chacha20-ietf

  5. aes-128-gcm

  6. aes-256-gcm

  7. chacha20-ietf-poly1305

(默认加密协议: chacha20-ietf-poly1305):

Shadowsocks 加密协议 = chacha20-ietf-poly1305

按 Enter 回车键 继续….或按 Ctrl + C 取消.

….准备安装了咯..看看有毛有配置正确了…

———- 安装信息 ————-

V2Ray 传输协议 = TCP

V2Ray 端口 = 46038

Shadowsocks 端口 = 26555

Shadowsocks 密码 = kony1120

Shadowsocks 加密协议 = chacha20-ietf-poly1305

———- END ————-

按 Enter 回车键 继续….或按 Ctrl + C 取消.

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No packages marked for update
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Package lrzsz-0.12.20-36.amzn2.0.2.x86_64 already installed and latest version
Package git-2.37.1-1.amzn2.0.1.x86_64 already installed and latest version
Package zip-3.0-11.amzn2.0.2.x86_64 already installed and latest version
Package unzip-6.0-43.amzn2.x86_64 already installed and latest version
Package curl-7.79.1-6.amzn2.0.1.x86_64 already installed and latest version
Package wget-1.14-18.amzn2.1.x86_64 already installed and latest version
Package qrencode-3.4.1-3.amzn2.0.2.x86_64 already installed and latest version
Package libcap-2.54-1.amzn2.0.1.x86_64 already installed and latest version
Nothing to do
Wed Nov 23 02:22:51 CST 2022
/tmp /home/ec2-user/v2ray-3.05
Cloning into ‘/etc/v2ray/233boy/v2ray’…
remote: Enumerating objects: 1674, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (7/7), done.

图片引用方法三

安装结果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Downloading verification file for V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v5.1.0/v2ray-linux-64.zip.dgst
info: Extract the V2Ray package to /tmp/tmp.mJ4GEpAHXR and prepare it for installation.
info: Systemd service files have been installed successfully!
warning: The following are the actual parameters for the v2ray service startup.
warning: Please make sure the configuration file path is correctly set.
# /etc/systemd/system/v2ray.service
[Unit]
Description=V2Ray Service
Documentation=https://www.v2fly.org/
After=network.target nss-lookup.target

[Service]
User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/local/bin/v2ray run -config /usr/local/etc/v2ray/config.json
Restart=on-failure
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
# In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there.
# Or all changes you made will be lost! # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray run -config /usr/local/etc/v2ray/config.json

installed: /usr/local/bin/v2ray
installed: /usr/local/share/v2ray/geoip.dat
installed: /usr/local/share/v2ray/geosite.dat
installed: /usr/local/etc/v2ray/config.json
installed: /var/log/v2ray/
installed: /var/log/v2ray/access.log
installed: /var/log/v2ray/error.log
installed: /etc/systemd/system/v2ray.service
installed: /etc/systemd/system/v2ray@.service
removed: /tmp/tmp.mJ4GEpAHXR
info: V2Ray v5.1.0 is installed.
You may need to execute a command to remove dependent software: apt purge curl unzip
Please execute the command: systemctl enable v2ray; systemctl start v2ray
root@ip-172-31-46-95:/home/ubuntu# system enable v2ray
Command 'system' not found, did you mean:
command 'systemd' from deb systemd (249.11-0ubuntu3.6)
command 'system3' from deb simh (3.8.1-6.1)
Try: apt install <deb name>

server 服务端配置

1
2
# vim /usr/local/etc/v2ray/config.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

{
"log": {
"loglevel": "warning"
},
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "block"
}
]
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 1080,
"protocol": "shadowsocks",
"settings": {
"method": "chacha20-ietf-poly1305",
"password": "{{ ******,, ******,, ******, }}"
},
"streamSettings": {
"network": "grpc",
"grpcSettings": {
"serviceName": "michi"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block"
}
]
}

client 客户端配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"log": {
"loglevel": "warning"
},
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "direct"
}
]
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": "1080",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
{
"listen": "127.0.0.1",
"port": "1081",
"protocol": "http"
}
],
"outbounds": [
{
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "{{ host }}",
"port": 443,
"method": "chacha20-ietf-poly1305",
"password": "{{ ******,, ******, ******, }}"
}
]
},
"streamSettings": {
"network": "grpc",
"security": "tls",
"grpcSettings": {
"serviceName": "michi"
}
},
"tag": "proxy"
},
{
"protocol": "freedom",
"tag": "direct"
}
]
}


## 获取并生成ssl证书

letsencrypt certonly –standalone –email konylee@foxmail.com -d www.ringyin.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/www.ringyin.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/www.ringyin.com/privkey.pem
This certificate expires on 2023-02-21.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.


If you like Certbot, please consider supporting our work by:


安装完成后,添加一个配置文件:

1
2
sudo vim /etc/nginx/conf.d/v2ray.conf

内容如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

server {
listen 443 ssl;
ssl on;
server_name www.ringyin.com;
ssl_certificate /etc/letsencrypt/live/www.ringyin.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.ringyin.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

location /PATH {
proxy_redirect off;
proxy_pass http://127.0.0.1:42348;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

access_log /var/log/nginx-v2ray-access.log;
error_log /var/log/nginx-v2ray-error.log;
}

其中需要更改的有:
第 4、5、6 行的域名:使用自己的域名
第 10 行的路径:可以任意用一个单词,只要和 v2ray 中的一样即可

然后新建日志文件:

1
2
3
4
5
touch /var/log/nginx-v2ray-access.log;
touch /var/log/nginx-v2ray-error.log;
chown nginx:nginx /var/log/nginx-v2ray-access.log;
chown nginx:nginx /var/log/nginx-v2ray-error.log;

添加完成后即可启动 Nginx

1
2
3
systemctl start nginx
systemctl enable nginx

没有问题的话,这个节点现在就可以用了。

参考

https://www.wenjinyu.me/a-simple-instructions-for-how-to-deploy-v2ray-with-tls-and-ws-mode/

  • Clone the repository

    Go to the folder where you want to store your project, and clone the new repository:

    1
    ~$ git clone https://github.com/konylee/konylee.github.io
  • Hello World

    Enter the project folder and add an index.html file:

    1
    2
    3
    ~$ cd konylee.github.io

    ~$ echo "Hello World" > index.html
  • Push it

    Add, commit, and push your changes:

    1
    2
    3
    4
    5
    ~$ git add --all

    ~$ git commit -m "Initial commit"

    ~$ git push -u origin main
  • …and you’re done!

    Fire up a browser and go to https://konylee.github.io.


测试文章
http://example.com/2022/11/22/测试文章/
作者
Kony Lee
发布于
2022年11月22日
更新于
2023年4月8日
许可协议