
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
CHAMELEONSOCKS provides containerized system-wide redsocks-based TCP redirector to generic SOCKS or HTTP proxies. There is a script to aid in the initial setup. This script pulls a tar.gz and loads it as a docker image. It then creates a persistent container that includes your specific proxy/exception information and that persistent container is what is run to provide redirection. Note: This requires root access since the containers need to be run in privileged mode.
NOTE: You will need Internet connectivity to run the installer/upgrade script
https_proxy=https://myproxy.mycomp.com:<port> wget https://raw.githubusercontent.com/crops/chameleonsocks/master/chameleonsocks.sh && chmod 755 chameleonsocks.sh
https_proxy=https://myproxy.mycomp.com:<port> PROXY=mysocksproxy.mycomp.com PORT=<socksproxyport> PAC_URL=http://wpad.mycomp.com/wpad.dat ./chameleonsocks.sh --install
Install Docker by following the official instructions for your distribution
https://docs.docker.com/engine/installation/#on-linux
export https_proxy=https://my.proxy.com:port_number
wget https://raw.githubusercontent.com/crops/chameleonsocks/master/chameleonsocks.sh && chmod 755 chameleonsocks.sh
**Open chameleonsocks.sh in your favourite text editor and enter your proxy server (PROXY), proxy server port (PORT) and proxy server type (PROXY_TYPE). supported PROXY_TYPE values are: socks4, socks5, http-connect, http-relay **
Example:
PROXY=my.proxy.com
PORT=1080
PROXY_TYPE=socks5
NOTE: The installer provides the following proxy exception rules by default. Requests sent to the following subnets will not be redirected to the proxy.
0.0.0.0/8
127.0.0.0/8
169.254.0.0/16
224.0.0.0/4
240.0.0.0/4
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
**Chameleonsocks provides support for standard PAC or WPAD (Web Proxy Auto Discovery) files. Set the PAC_URL variable in chameleonsocks.sh to the URL of your PAC file or WPAD file and the subnet exceptions from the PAC file will be extracted and applied to the chameleonsocks ruleset. Note: ONLY exceptions will be pulled from the PAC_URL file, not the proxy itself. **
Example:
PAC_URL=[]
-or-
PAC_URL=[]
To add your own proxy exception rules, please append your subnets or individual ip addresses to the default exceptions file and add its absolute path to the EXCEPTIONS variable in chameleonsocks.sh.
The default execeptions file can be found here: https://github.com/crops/chameleonsocks/blob/master/confs/chameleonsocks.exceptions
Example:
EXCEPTIONS=/path/to/my/exceptions/chameleonsocks.exceptions
./chameleonsocks.sh --install
OR
./chameleonsocks.sh --upgrade
You can start/stop chameleonsocks in one of two ways:
By using the chameleonsocks.sh script from the command line
Start chameleonsocks
./chameleonsocks.sh --start
Stop chameleonsocks
./chameleonsocks.sh --stop
By using the Docker UI interface
Install Docker UI
./chameleonsocks.sh --install-ui
Open the following URL in your web browser
http://localhost:7777
Click the "containers" tab -> Select the "chameleonsocks" container -> Start/Stop the container to enable/disable the proxy
Uninstall Docker UI
./chameleonsocks.sh --uninstall-ui
./chameleonsocks.sh --version
./chameleonsocks.sh --uninstall
Download the installer script with your favourte web browser
Download the chameleonsocks image with your favourte web browser
Launch Docker Quickstart Terminal and navige to the directory where the installer and the image were downloaded
Install chameleonsocks with the following command
./chameleonsocks.sh --install_local chameleonsocks-1.2.tar.gz
If you want to try different com***ations because your proxy got moved
or because you discover that the XXX proxy is much faster for you,
you can quickly do the following:
To get the initial image (where myproxy.com:8080 is your https proxy):
https_proxy=https://myproxy.com:8080 ./chameleonsocks.sh --install
You can tell if you have the initial docker image by doing
docker images | grep chameleon
and you should see something like: crops/chameleonsocks VERSION (1.X)...
To try different settings you can either edit the chameleonsocks.sh file or prepend environment variables to the call.
PROXY=myproxy.com PAC_URL=http://autoproxy.mycomp.com ./chameleonsocks.sh --start
To retry do:
./chameleonsocks.sh --stop && docker rm chameleonsocks PROXY=myproxy2.com PAC_URL=http://autoproxy.mycomp.com ./chameleonsocks.sh --start
If you want to stop and start chameleonsocks without using the script after having made the container the first time (which DOES need the script), do:
docker stop chameleonsocks docker start chameleonsocks
To see what may be wrong, you can do:
docker logs chameleonsocks
Note: if you are using a proxy.pac type autoconfig for your exceptions, it can take some time (?30 seconds?) to get the file and have the container start routing. If you're autoproxy breaks, you need to redo the install and not set the autoproxy (PAC_URL). This will give you just the default exceptions.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务