naiveproxy配置

服务器端

下载安装包
解压出执行文件

1
2
xz -d <naiveproxy.tar.xz>
tar xvf <naiveproxy.tar>

新建Caddyfile并编辑

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
{
order forward_proxy before route
admin off
auto_https off
}

:443 {
tls path_to_crt path_to_key { #path_to_crt和path_to_key分别换为crt和key文件的绝对地址
ciphers TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
alpn h2 http/1.1
}

forward_proxy {
basic_auth username password #username password变更为帐号密码,后面登录用
hide_ip
hide_via
probe_resistance
}

@host {
host xxx1.com # naiveproxy使用的域名
}
route @host {
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
}
reverse_proxy xxx2.com { # proxy的域名,未登录情况下会redirect到这里
header_up Host {upstream_hostport}
header_up X-Forwarded-Host {host}
}
}
}

运行caddy./caddy start

客户端配置

1
2
3
4
{
"listen": "socks://127.0.0.1:1080",
"proxy": "https://user:pass@example.com"
}

android端
NekoBox for Android

来源