/naive

NaiveProxy Server

Primary LanguageShellGNU General Public License v3.0GPL-3.0

NaiveProxy Server

English / 简体中文

Caddy with forward proxy

License: GPL-3.0 GitHub stars GitHub forks GitHub release

Features

  1. Easy to deploy
  2. User authentication
  3. Custom camouflage website
  4. Automatic certificate management

Recommended OS

OS: CentOS 8+/Ubuntu 20+/Debian 11+

CPU: x86_64/amd64 arm64/aarch64

Memory: ≥ 128MB

Deployment

Quick Install (Recommended)

Install Latest Version

bash <(curl -fsSL https://raw.githubusercontent.com/jonssonyan/naive/main/install.sh)

Install Custom Version

bash <(curl -fsSL https://raw.githubusercontent.com/jonssonyan/naive/main/install.sh) v2.7.6

systemd

Executable files: https://github.com/jonssonyan/naive/releases

Create a new configuration file naive.json, examples: naive.json

mkdir -p /usr/local/naive/
curl -fsSL https://github.com/jonssonyan/naive/releases/latest/download/naive-linux-amd64 -o /usr/local/naive/naive && chmod +x /usr/local/naive/naive
curl -fsSL https://raw.githubusercontent.com/jonssonyan/naive/main/naive.service -o /etc/systemd/system/naive.service
sed -i "s|^ExecStart=.*|ExecStart=/usr/local/naive/naive run --config naive.json|" "/etc/systemd/system/naive.service"
systemctl daemon-reload
systemctl enable naive
systemctl restart naive

Uninstall

systemctl stop naive
rm -rf /etc/systemd/system/naive.service /usr/local/naive/

Docker

  1. Install Docker

    https://docs.docker.com/engine/install/

    bash <(curl -fsSL https://get.docker.com)
  2. Start a container

    Create a new configuration file naive.json, examples: naive.json

    docker pull jonssonyan/naive
    
    docker run -d \
      --name naive --restart always \
      --network=host \
      -v /naive/html/:/naive/html/ \
      -v /naive/config/:/naive/config/ \
      jonssonyan/naive \
      ./naive run --config /naive/naive.json

Uninstall

docker rm -f naive
docker rmi jonssonyan/naive
rm -rf /naive

Performance Optimization

Build

  • 编译最新版

    Windows: build.bat

    Linux: build.sh

  • 编译历史版本

    klzgrad/forwardproxycaddyserver/caddy 版本之间存在兼容关系,可以在这里 查看 klzgrad/forwardproxy 支持最低的 caddyserver/caddy 版本。quic-go/quic-go 的版本可以在这里查看。

    https://github.com/klzgrad/naiveproxy/releases 下载指定版本 Source code 到本地,例如将Source code 解压至 naive 文件夹内。

    例如:编译 v2.7.x

    CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
    xcaddy build v2.7.0 --output build/naive-linux-amd64 \
    --with github.com/caddyserver/forwardproxy=./naive \
    --replace github.com/quic-go/quic-go=github.com/quic-go/quic-go@v0.40.0

    需要注意 golang/go klzgrad/forwardproxy quic-go/quic-go 的版本

Other

Telegram Channel: https://t.me/jonssonyan_channel

You can subscribe to my channel on YouTube: https://www.youtube.com/@jonssonyan

If this project is helpful to you, you can buy me a cup of coffee.

Wechat sponsor code

License

GPL-3.0