Trojan Setup

v1.0.0

自动安装和配置 Trojan 代理客户端,支持 proxychains4 全局代理,修复 Chrome 官方源。适用于 Linux 系统的翻墙环境搭建。

0· 114·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for salebender249-del/trojan-setup.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Trojan Setup" (salebender249-del/trojan-setup) from ClawHub.
Skill page: https://clawhub.ai/salebender249-del/trojan-setup
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install trojan-setup

ClawHub CLI

Package manager switcher

npx clawhub@latest install trojan-setup
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (install/configure Trojan client, proxychains, fix Chrome source) match the included README, SKILL.md, and install.sh. The script downloads Trojan from GitHub releases and installs proxychains4 and Chrome repo updates — all consistent with the stated purpose.
Instruction Scope
SKILL.md instructs running the included install.sh and editing /usr/src/trojan/config.json; the script and docs only reference expected paths and tools (apt, wget, gpg, /etc/proxychains4.conf, /etc/apt). It requires sudo and modifies system files, which is within scope for an installer but worth noting.
Install Mechanism
No platform install spec; this is an instruction-only skill with a bundled install.sh. The script downloads the Trojan release from GitHub (official releases URL) and the Google signing key from dl.google.com — both well-known hosts. The script extracts and writes binaries to /usr/src and updates system config; this is expected for an installer.
Credentials
The skill does not request environment variables or secrets. It asks the user to manually populate Trojan server credentials in the config file (local input), which is proportionate to its function.
Persistence & Privilege
The installer runs as root and modifies system-wide files (apt sources, proxychains config, keyrings, /usr/src). It also instructs enabling a systemd service 'trojan' (the script does not create a service file itself). These are expected for system-level installation but grant persistent system changes — review before running as root.
Assessment
This skill is coherent with its stated purpose, but it is a system-level installer: it requires sudo and will modify /etc/* and /usr/src/*. Before running: (1) review the install.sh contents (included) yourself; (2) verify the trojan GitHub release/version and consider checking checksums if available; (3) back up any affected config files (proxychains, apt sources); (4) be aware the script does not create a systemd service file for 'trojan' — you may need to provide one; (5) only use trojan and proxy tools in ways that comply with local law and your network policies; (6) avoid running untrusted install scripts as root on production systems.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🌐 Clawdis
latestvk975ahj990mcm7k3n4h1a92wwn83wpnc
114downloads
0stars
1versions
Updated 4w ago
v1.0.0
MIT-0

Trojan Setup Skill

自动安装和配置 Trojan 代理客户端,实现 Linux 系统翻墙访问外网。

功能

  • ⚡ 自动下载安装 Trojan v1.16.0
  • 🔧 配置 Trojan client 模式
  • 🌐 安装 proxychains4 全局代理
  • 🖥️ 修复 Chrome 官方安装源
  • 📖 提供详细使用说明

前置条件

  • Linux 系统(Ubuntu/Debian 等)
  • sudo 权限
  • Trojan 服务器信息(IP、端口、密码、SNI)

安装步骤

1. 运行安装脚本

cd ~/.openclaw/workspace/skills/trojan-setup
chmod +x install.sh
sudo ./install.sh

2. 配置 Trojan

编辑配置文件:

sudo nano /usr/src/trojan/config.json

填写你的 Trojan 服务器信息:

{
    "run_type": "client",
    "local_addr": "0.0.0.0",
    "local_port": 1080,
    "remote_addr": "YOUR_SERVER_IP",
    "remote_port": YOUR_SERVER_PORT,
    "password": ["YOUR_PASSWORD"],
    "ssl": {
        "sni": "YOUR_SNI",
        "verify": false,
        "verify_hostname": false,
        "cert": ""
    }
}

参数说明:

  • remote_addr: Trojan 服务器 IP 地址
  • remote_port: Trojan 服务器端口
  • password: Trojan 连接密码
  • sni: 服务器域名(SNI)

3. 启动 Trojan

sudo systemctl start trojan
sudo systemctl enable trojan  # 开机自启

4. 验证代理

# 测试本地 IP
curl -4 ip.sb

# 测试代理 IP
proxychains4 curl -4 ip.sb

使用方法

命令行代理

# 单次命令走代理
proxychains4 curl https://www.google.com
proxychains4 wget https://example.com/file.zip
proxychains4 git clone https://github.com/user/repo.git
proxychains4 npm install

# 设置环境变量(当前终端)
export http_proxy=socks5://127.0.0.1:1080
export https_proxy=socks5://127.0.0.1:1080

# 取消代理
unset http_proxy
unset https_proxy

浏览器代理

  1. 安装 SwitchyOmega 插件
  2. 配置 SOCKS5 代理:127.0.0.1:1080
  3. 选择 proxy 模式即可翻墙

Chrome 浏览器安装

# 更新源并安装
sudo apt update
sudo apt install google-chrome-stable

# 启动 Chrome
google-chrome

管理命令

# 查看 Trojan 状态
sudo systemctl status trojan

# 启动 Trojan
sudo systemctl start trojan

# 停止 Trojan
sudo systemctl stop trojan

# 重启 Trojan
sudo systemctl restart trojan

# 查看日志
sudo cat /usr/src/trojan/trojan.log

配置文件示例

查看 config.json.example 获取完整配置模板:

cat ~/.openclaw/workspace/skills/trojan-setup/config.json.example

常见问题

Q: Trojan 启动失败?

A: 检查日志:

sudo cat /usr/src/trojan/trojan.log

常见原因:

  • 配置文件格式错误
  • 服务器信息填写错误
  • 端口被占用

Q: 代理不生效?

A: 检查 Trojan 是否运行:

sudo systemctl is-active trojan

Q: Chrome 无法安装?

A: 确保已添加官方源和 GPG 密钥,然后:

sudo apt update
sudo apt install google-chrome-stable

安全提示

⚠️ 本工具仅用于合法用途,请遵守当地法律法规。

卸载

# 停止服务
sudo systemctl stop trojan
sudo systemctl disable trojan

# 删除文件
sudo rm -rf /usr/src/trojan
sudo rm -f /etc/systemd/system/trojan.service

# 删除 proxychains4
sudo apt remove proxychains4

# 刷新 systemd
sudo systemctl daemon-reload

相关链接

Comments

Loading comments...