甲骨文x-ui搭建过程笔记
甲骨文开台机子
此处略过,注意主机选择ubuntu2004
防火墙相关:「硬核教程」Oracle Cloud甲骨文云设定安全组仍无法访问的解决办法-Wood Chen
注意开放22,80,443,2053,2083,8087,2096,8443
1 | sudo apt install firewalld |
查看防火墙状态:sudo firewall-cmd —zone=public —list-ports
查看防火墙当前规则:sudo firewall-cmd —list-all
确认特定端口是否开放:sudo firewall-cmd —zone=public —query-port=2083/tcp
系统初始化配置
设置时间:
1
2sudo timedatectl set-timezone Asia/Shanghai
sudo hwclock --systohc安装3x-ui:xeefei/3x-ui: 〔3X-UI〕中文优化版
1
bash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh)
配置ssl
先在cloudflare添加解析,确保能ping1
2
3
4sudo systemd-resolve --statistics #查看当前缓存
sudo systemd-resolve --flush-caches #刷新缓存
输入x-ui,申请ssl证书进入面板,配置面板ssl,配置订阅ssl
注意面板的地址挂小黄云代理,订阅ssl不挂小黄云代理
建两个协议
vless+vision+reality:正常配置
vless+ws+tls:地址写面板地址,得添加请求头host,min/ max version改为1.1-1.3,删除所有alpn,并allow insecure,证书选择面板证书安装warp:fscarmen / warp · GitLab,选择安装 WireProxy
1
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]
配置面板出入站:xray设置-高级设置
出站规则
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[
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "warp",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 40000
}
]
}
},
{
"tag": "WARP-socks5-v4",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv4"
},
"proxySettings": {
"tag": "warp"
}
},
{
"tag": "WARP-socks5-v6",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv6"
},
"proxySettings": {
"tag": "warp"
}
},
{
"tag": "blocked",
"protocol": "blackhole",
"settings": {}
}
]路由规则:
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[
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"outboundTag": "blocked",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "blocked",
"protocol": [
"bittorrent"
]
},
{
"type": "field",
"domain": [
"ip.sb" //走ipv4的地址
],
"outboundTag": "WARP-socks5-v4"
},
{
"type": "field",
"domain": [
"geosite:netflix", //走ipv6的地址
"geosite:openai",
"p3terx.com",
"ip111.cn",
"ip.gs"
],
"outboundTag": "WARP-socks5-v6"
}
]
时间设置
- 首先输入
1 | date -R1. |
查看当下系统时间是否一致。
- 设置时区,亚洲/上海:
1 | sudo timedatectl set-timezone Asia/Shanghai1. |
- 将当前时间写入BIOS避免重启之后失效:
1 | sudo hwclock --systohc1. |
- 再次查看日期是否更改成功
1 | date -R |
cloudflare设置
由于订阅的地址无法修改,都是xxx.xxx.com,但是两个协议只想让reality访问直连域名(443端口),ws+tls(8443端口,自己改优选ip才能使用)需要阻断以保证vps安全性,故还需配置cloudflare
待定,目前关闭reality,只是用ws+tls
只允许域名,不允许ip访问
在x-ui的面板设置
-常规
里面的面板监听域名处填写访问的域名即可
慎重,因为一旦域名网站进不去就寄了
防火墙设置
1 | #开放端口 |
bbr+cake加速
安装锐速 BBR+cake
支持系统:Centos 6+
/Debian 7+
/Ubuntu 14+
,BBR
魔改版不支持 Debian 8
。
注意:该脚本在 Vultr
各个系统均测试通过,如果期间有出现任何问题,可向原作者反映帮助改善。
运行以下命令:
1 | wget -N --no-check-certificate "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh |