3proxy

部署与配置 3proxy 轻量级通用代理服务器:设置 HTTP/HTTPS、SOCKS4/5 或透明代理,构建代理链,配置身份验证、带宽限制、访问控制列表(ACL)、代理轮换与多端口代理,设置日志与流量统计,作为无需重型 VPN 的轻量级代理解决方案。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
7

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "3proxy":https://skillpi.com/zh/skills/deepskill-cf25188a4e52fb2c47e7253638c894dcf7a853aaf5fa0903148542cb3cfecf0f。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

部署与配置 3proxy 轻量级通用代理服务器:设置 HTTP/HTTPS、SOCKS4/5 或透明代理,构建代理链,配置身份验证、带宽限制、访问控制列表(ACL)、代理轮换与多端口代理,设置日志与流量统计,作为无需重型 VPN 的轻量级代理解决方案。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: 3proxy
description: >-
  Deploy and configure 3proxy — a lightweight universal proxy server. Use when a
  user asks to set up HTTP, HTTPS, SOCKS4, SOCKS5, or transparent proxies, build
  proxy chains, configure authentication, set bandwidth limits, manage access
  control lists, set up proxy rotation, create multi-port proxy servers,
  configure logging and traffic accounting, or deploy a lightweight proxy
  without heavy VPN overhead. Covers all 3proxy features including proxy
  chaining, ACLs, traffic shaping, and multi-protocol support.
license: Apache-2.0
compatibility: 'Linux, FreeBSD, Windows (3proxy 0.9+)'
metadata:
  author: terminal-skills
  version: 1.0.0
  category: devops
  tags:
    - 3proxy
    - proxy
    - socks5
    - http-proxy
    - networking

3proxy

Overview

Deploy 3proxy — the tiny, fast, universal proxy server supporting HTTP(S), SOCKS4/5, port forwarding, and transparent proxying in a single ~200KB binary. Ideal for lightweight proxy setups, proxy chaining, multi-user access with traffic accounting, and scenarios where a full VPN is overkill. This skill covers installation, multi-protocol configuration, authentication, ACLs, bandwidth control, proxy chains, and production deployment.

Instructions

Step 1: Installation

From package manager:

# Ubuntu/Debian
apt update && apt install -y 3proxy
# Config: /etc/3proxy/3proxy.cfg — Service: systemctl start 3proxy

From source (latest):

cd /tmp && git clone https://github.com/3proxy/3proxy.git && cd 3proxy
make -f Makefile.Linux && make -f Makefile.Linux install
mkdir -p /etc/3proxy /var/log/3proxy

Systemd service (/etc/systemd/system/3proxy.service):

[Unit]
Description=3proxy - tiny proxy server
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/3proxy /etc/3proxy/3proxy.cfg
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target

Step 2: Basic Configuration

Minimal HTTP + SOCKS5 proxy (/etc/3proxy/3proxy.cfg):

daemon
log /var/log/3proxy/3proxy.log D
logformat "L%t %N %p %E %C:%c %R:%r %O %I %T"
rotate 30

nserver 1.1.1.1
nserver 8.8.8.8
nscache 65536
timeouts 1 5 30 60 180 1800 15 60

internal 0.0.0.0
external 0.0.0.0

proxy -p3128    # HTTP proxy
socks -p1080    # SOCKS5 proxy

With authentication (password types: CL: cleartext, CR: crypt hash, NT: NT hash):

users admin:CL:strongpassword123
users user1:CL:password1
auth strong
proxy -p3128
socks -p1080

Step 3: Access Control Lists (ACLs)

ACL rules are processed top to bottom, first match wins:

users admin:CL:adminpass
users dev1:CL:devpass
auth strong

allow admin                        # Full access
allow dev1,dev2 * * 80,443         # Devs: HTTP/HTTPS only
deny *                             # Block everything else

proxy -p3128
socks -p1080

Time-based: allow * * * * 1-5 08:00:00-18:00:00 (Mon-Fri work hours)

IP-based: allow * 192.168.1.0/24 then deny *

Destination filtering: deny * * facebook.com,instagram.com *

Step 4: Multi-Port / Multi-Protocol

# No-auth proxies on localhost
auth none
internal 127.0.0.1
proxy -p3128
socks -p1080

# Authenticated proxies on public interface
flush
auth strong
users admin:CL:password
internal 0.0.0.0
proxy -p8080
socks -p1081

Port forwarding: tcppm 2222 10.0.0.5 22 (forward local 2222 to SSH)

Step 5: Proxy Chaining

# Route through upstream proxy
parent 1000 socks5 upstream-proxy.com 1080 user pass

# Load balance across multiple upstreams (weight-based)
parent 1000 socks5 proxy1.com 1080
parent 1000 socks5 proxy2.com 1080

# Double hop: socks5+ connects through the previous parent
parent 1000 socks5 hop1.com 1080 user1 pass1
parent 500 socks5+ hop2.com 1080 user2 pass2

proxy -p3128
socks -p1080

Step 6: Bandwidth & Traffic Control

bandlimin 1048576 user1      # Limit user1 to 1 MB/s
bandlimout 2097152 *         # 2 MB/s outbound for all
connlim 5 *                  # Max 5 concurrent connections per user
maxconn 1000                 # Total connection limit

# Traffic accounting with monthly quotas
counter /var/log/3proxy/traffic.counters
countin 10737418240 * * *    # 10GB monthly incoming per user
countout 10737418240 * * *   # 10GB monthly outgoing per user

Step 7: Security Hardening

setgid 65534
setuid 65534
internal 10.0.0.1              # Restrict listening interface
timeouts 1 5 30 60 180 1800 15 60
connlim 3 *
bandlimin 524288 *

# Block proxy access to private networks
deny * * 127.0.0.0/8 *
deny * * 10.0.0.0/8 *
deny * * 172.16.0.0/12 *
deny * * 192.168.0.0/16 *
allow *

Firewall:

ufw allow from 10.0.0.0/8 to any port 3128 proto tcp
ufw allow from 10.0.0.0/8 to any port 1080 proto tcp
ufw deny 3128
ufw deny 1080

Examples

Example 1: Set up an authenticated multi-protocol proxy for a small team

User prompt: "Set up a 3proxy server on our Ubuntu VPS at 203.0.113.50 with HTTP and SOCKS5 proxies. Create accounts for alice and bob with 50GB monthly traffic limits each, restrict them to web ports only, and give me full admin access."

The agent will install 3proxy from source, create a systemd service, and generate /etc/3proxy/3proxy.cfg with DNS settings, two user accounts (alice and bob) with auth strong, ACL rules granting admin full access and restricting alice/bob to ports 80 and 443, bandwidth counters set to 53687091200 bytes (50GB), HTTP proxy on port 3128 and SOCKS5 on port 1080, and proper logging with 30-day rotation.

Example 2: Chain traffic through an upstream SOCKS5 proxy with IP rotation

User prompt: "Configure our 3proxy to route all outgoing traffic through three upstream SOCKS5 proxies for IP rotation. The upstreams are at proxy1.example.com:1080, proxy2.example.com:1080, and proxy3.example.com:1080 with user 'rotate' and password 'r0tate!2025'. Local proxy should listen on port 8080."

The agent will edit the 3proxy config to define three parent directives with equal weights of 1000 each pointing to the upstream SOCKS5 servers with credentials, then configure a local HTTP proxy on port 8080 and SOCKS5 on port 1081, enable logging to track which upstream was used per request, and restart the 3proxy service.

Guidelines

  • Always use auth strong on publicly exposed proxy ports; never run open proxies accessible from the internet
  • Run 3proxy as an unprivileged user with setuid/setgid and block proxy access to private RFC1918 IP ranges to prevent SSRF attacks
  • Use the flush directive to separate configuration blocks with different auth or interface settings; without it, settings accumulate
  • Place deny rules for private networks before the final allow * since 3proxy processes ACLs top to bottom with first-match semantics
  • Set connlim and bandlimin to prevent a single user from exhausting server resources, and enable traffic counters for usage monitoring
  • Back up /etc/3proxy/3proxy.cfg before editing since 3proxy has no config validation command and a syntax error will prevent startup

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 提供 3proxy 的完整部署与配置指南,涵盖多协议代理、代理链、身份验证、访问控制、带宽限制、流量统计等核心功能
  • 适用于 DevOps 和网络管理员,解决轻量级代理服务器搭建的实际需求
  • 包含详细的端到端示例,帮助用户快速上手并应用于生产环境
触发精准90/100

亮点

  • 触发词覆盖全面,明确列出适用场景,包括设置各种类型的代理、构建代理链、配置身份验证等
  • 边界清晰,能够准确触发该 Skill,减少误触或漏触风险
结构规范90/100

亮点

  • 结构清晰,分为 Overview、Instructions、Examples 和 Guidelines,步骤划分明确
  • frontmatter 完整,包含 name、description、license、compatibility、metadata 等信息
  • 提供详细的配置示例和端到端使用案例,便于用户理解和执行
执行可靠90/100

亮点

  • 工具来源明确,提供从包管理器和源码安装的方法
  • 配置参数正确,覆盖主要异常情况,如访问控制、安全加固、防火墙设置等
  • 提供备份配置文件的建议,避免因配置错误导致服务无法启动
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 38 行
  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 206 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。