注:本站未验证视频效果,碰到问题完全不知道如何解决的小白网友可做了解但不建议尝试,另外在vps线路不佳的情况下,naiveproxy在翻墙速度上并无优势。
视频相关文字内容{摘自作者博客https://bulianglin.com/}:
naive服务端配置
编译安装caddy+naive:
apt install golang-go
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy@caddy2=github.com/klzgrad/forwardproxy@naive
如果第二条指令执行出错,可以尝试执行go env -w GO111MODULE=on 再重试,还不行的话请自行搜索升级go版本方法
Caddyfile配置:
:443, naive.buliang0.tk #你的域名
tls example@example.com #你的邮箱
route {
forward_proxy {
basic_auth user pass #用户名和密码
hide_ip
hide_via
probe_resistance
}
#支持多用户
forward_proxy {
basic_auth user2 pass2 #用户名和密码
hide_ip
hide_via
probe_resistance
}
reverse_proxy https://demo.cloudreve.org { #伪装网址
header_up Host {upstream_hostport}
header_up X-Forwarded-Host {host}
}
}
caddy常用指令:
前台运行caddy:./caddy run
后台运行caddy:./caddy start
停止caddy:./caddy stop
重载配置:./caddy reload
caddy配置守护进程(开机自启):https://github.com/klzgrad/naiveproxy/wiki/Run-Caddy-as-a-daemon
自定义端口:
naive如果要用自定义端口,需要使用json的配置方式,新手可以直接跳过
启动方式:./caddy start --config config.json
config.json内容:
//需删除注释内容caddy才能加载
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":4431" //监听端口
],
"routes": [
{
"handle": [
{
"auth_user_deprecated": "user", //用户名
"auth_pass_deprecated": "pass", //密码
"handler": "forward_proxy",
"hide_ip": true,
"hide_via": true,
"probe_resistance": {}
}
]
},
{
"handle": [
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"{http.reverse_proxy.upstream.hostport}"
],
"X-Forwarded-Host": [
"{http.request.host}"
]
}
}
},
"transport": {
"protocol": "http",
"tls": {}
},
"upstreams": [
{
"dial": "demo.cloudreve.org:443" //伪装网址
}
]
}
]
}
],
"tls_connection_policies": [
{
"match": {
"sni": [
"naive.buliang0.tk" //域名
]
},
"certificate_selection": {
"any_tag": [
"cert0"
]
}
}
],
"automatic_https": {
"disable": true
}
}
}
},
"tls": {
"certificates": {
"load_files": [
{
"certificate": "a.crt", //公钥
"key": "a.key", //私钥
"tags": [
"cert0"
]
}
]
}
}
}
}
客户端配置
naive客户端:https://github.com/klzgrad/naiveproxy/releases/latest
客户端配置:
{
"listen": "socks://127.0.0.1:1080",
"proxy": "https://user:pass@example.com"
}
注:使用v2rayN加载naive内核需要将配置文件的log行删除,否则会断流
TLS指纹查看
jarm工具:https://github.com/salesforce/jarm
下载jarm:wget https://raw.githubusercontent.com/salesforce/jarm/master/jarm.py
查看网站jarm指纹:python3 jarm.py naive.buliang0.tk
网络空间资产搜索引擎:https://fofa.info