怎样在Ubuntu 20.04上安装NaiveProxy?
怎样在Ubuntu 20.04上安装NaiveProxy?
how to install NaiveProxy on Ubuntu 20.04
前提:)
- 仅
windows10 Pro教程 - 域名
- Ubuntu 20.04
- ProxySU
- NaiveGUI
- 工具打包下载
服务器端:)
- 一台
Ubuntu20.04 服务器,已经知道root密码:)

- proxysu一秒安装

- 服务器端安装成功

windows客户端:)
- 剪贴板导入链接

- start

- too young too simple sometimes naive!?

不过还是推荐使用mellow
1choco install -y mellow
推荐个几把,mellow调试失败
以下是手动搭建的过程,我自己看即可。
前提
- Ubuntu 20.04
- mobaxterm
- 域名
服务器端
安装libnss3
1apt install libnss3
安装caddy 1.0带http.forwardproxy版本
1curl https://getcaddy.com | bash -s personal http.forwardproxy
caddy开机自启
1cat <<EOF > /etc/systemd/system/caddy.service
2[Unit]
3Description=Caddy
4Documentation=https://caddyserver.com/docs/
5After=network.target
6
7[Service]
8User=root
9Group=root
10ExecStart=/usr/local/bin/caddy -agree --conf /etc/caddy/Caddyfile
11ExecReload=/usr/local/bin/caddy reload --conf /etc/caddy/Caddyfile
12
13
14[Install]
15WantedBy=multi-user.target
16EOF
caddy配置
1mkdir -p /etc/caddy
2
3cat <<EOF > /etc/caddy/Caddyfile
4moha.scaleya.xyz
5root /var/www/html
6tls scaleya.com@gmail.com
7forwardproxy {
8 basicauth admin admin
9 hide_ip
10 hide_via
11 probe_resistance secret.localhost
12 upstream http://127.0.0.1:8080
13}
14EOF
1systemctl daemon-reload
2systemctl enable caddy
3systemctl stop caddy
4systemctl start caddy
5systemctl status caddy
自己编译NaiveProxy
1apt install git python2 ninja-build pkg-config libnss3-dev curl unzip ccache
2cd /srv
3git clone https://github.com/klzgrad/naiveproxy.git
4cd /srv/naiveproxy/src
5./get-clang.sh
6./build.sh
7
8
9
10../../build/build_config.h:45:10: fatal error: 'unistd.h' file not found
11#include <unistd.h>
12 ^~~~~~~~~~
131 error generated.
14[10/1891] ACTION //base:partition_alloc_buildflags(//build/toolchain/linux:clang_x64)
15ninja: build stopped: subcommand failed.
16
17算了 没搞出来
下载二进制包
1mkdir -p /etc/NaiveProxy
2
3wget https://github.com/klzgrad/naiveproxy/releases/download/v83.0.4103.61-1/naiveproxy-v83.0.4103.61-1-linux-x64.tar.xz
4
5tar -xf naiveproxy*.tar.xz && rm naiveproxy*.tar.xz
6
7cp naiveproxy*/* .
1cat <<EOF > /etc/systemd/system/naive.service
2[Unit]
3Description=NaiveProxy
4Documentation=https://github.com/klzgrad/naiveproxy
5After=network.target
6
7[Service]
8User=root
9Group=root
10ExecStart=/etc/NaiveProxy/naive /etc/NaiveProxy/config.json
11TimeoutStopSec=5s
12LimitNOFILE=1048576
13LimitNPROC=512
14PrivateTmp=true
15ProtectSystem=full
16AmbientCapabilities=CAP_NET_BIND_SERVICE
17
18[Install]
19WantedBy=multi-user.target
20EOF
1cat <<EOF > /etc/NaiveProxy/config.json
2{
3 "listen": "http://127.0.0.1:8080",
4 "padding": true
5}
6EOF
1systemctl daemon-reload
2systemctl enable naive
3systemctl stop naive
4systemctl start naive
5systemctl status naive
Scaleya 自用一键安装脚本
bash <(curl -skSL https://scaleya.com/shell/naive.sh)