
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://github.com/spacemeowx2/switch-lan-play/workflows/Build/badge.svg](https://github.com/spacemeowx2/switch-lan-play/actions?query=workflow%3ABuild)  | ARP,IPv4 | LAN Packets Switch <--------> PC(lan-play) <-------------> Server UDP
NOTE:
To play with your friends, you and your friends should run lan-play client connecting to the same Server on your PC, and set static IP on your Switch.
Your PC and Switch must be connected to the same router.
Download and run latest Npcap installer.
Must check Installed in WinPcap API-compatible mode. in Npcap installation wizard.
Download the latest lan-play.exe from https://github.com/spacemeowx2/switch-lan-play/releases
Run lan-play.exe
After that, you will prompted to enter a server as shown below:
--relay-server-addr is required Input the relay server address [ domain/ip:port ]:
You can find a list with public servers here: [***]
Optionally you can go to the Switch Lan Play *** to find people to match make: [***]
Make sure lan-play client is running.
Go to your Switch settings page, set the IP address to static. The IP address can be any from 10.13.0.1 to 10.13.255.254, excepting 10.13.37.1. But don't use the same IP address with your friend.
| IP Address | 10.13.?.? |
| Subnet Mask | 255.255.0.0 |
| Gateway | 10.13.37.1 |
Click save. Your Switch now can access the Internet via your PC.
Launch your game, hold L+R+LStick to enter lan-play mode. Host or join a game, enjoy!
lan-play --socks5-server-addr example.com:1080
Data sent to the relay server does not pass through the proxy.
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake -DCMAKE_BUILD_TYPE=Release ..
This project depends on libpcap, you can install libpcap0.8-dev on Ubuntu or Debian:
sudo apt install libpcap0.8-dev git gcc g++ cmake
Prepare a cmake, gcc, and run like this:
shmkdir build cd build cmake .. make
Use MSYS2 to compile.
shpacman -Sy pacman -S make \ mingw-w64-x86_64-cmake \ mingw-w64-x86_64-gcc
To compile 32bit program:
shpacman -S mingw-w64-i686-cmake \ mingw-w64-i686-gcc
Open MSYS2 MinGW 64-bit or MSYS2 MinGW 32-bit.
shmkdir build cd build cmake -G "MSYS Makefiles" .. make
shbrew install cmake
shmkdir build cd build cmake .. make
docker run -d -p 11451:11451/udp -p 11451:11451/tcp spacemeowx2/switch-lan-play
shgit clone https://github.com/spacemeowx2/switch-lan-play cd switch-lan-play/server npm install npm run build # build ts to js. run it again when code changed. npm start
Use --port pass the port parameter, or else it will use 11451/udp as default.
Use --simpleAuth pass the auth via username and password, or else there's no authentication.
Use --httpAuth pass the auth via http url, or else there's no authentication.
Use --jsonAuth pass the auth via json file, or else there's no authentication.
Example:
shnpm run build npm start -- --port 10086 --simpleAuth username:password
Meanwhile the monitor service will be started on port 11451/tcp by default, you can get online client count via HTTP request:
Request: GET http://{YOUR_SERVER_IP}:11451/info
Response: { "online": 42 }
The protocol is very simple now, but I'm going to add some fileds to calculate network quality(packet loss, ping), like timestamp, seq_id, etc.
cstruct packet { uint8_t type; uint8_t payload[packet_len - 1]; };
cenum type { KEEPALIVE = 0, IPV4 = 1, PING = 2, IPV4_FRAG = 3 };
The server can read IP addresses from payload and save source IP -> LAN IP to a cache table. If target ip address shown in payload doesn't hit the cache, broadcast this packet to the entire room(now a server is a room).
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务