☰ Menu
Home›Command-line Tools›switch-lan-play
CLI Open source 3 installs/mo

switch-lan-play for Mac

switch-lan-play

Enjoy games with your friends as if you were on a LAN.

switch-lan-play — overview

Enjoy games with your friends as if you were on a LAN.

Usage

To play with your friends, both you and your friends need to run the lan-play client connecting to the same Server on your PCs, and set static IP on your Switch.

Your PC and Switch must be connected to the same router.

Visit https://www.lan-play.com/ for instructions on how to set this up. See below for build instructions.

SOCKS5 Proxy

lan-play --socks5-server-addr example.com:1080

Data sent to the relay server does not pass through the proxy.

Build

Debug or Release

cmake -DCMAKE_BUILD_TYPE=Debug .. cmake -DCMAKE_BUILD_TYPE=Release ..

Ubuntu / Debian

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 cmake and gcc, then run the following:

Windows

Use MSYS2 to compile.

To compile a 32-bit program:

Open MSYS2 MinGW 64-bit or MSYS2 MinGW 32-bit.

Mac OS

Server

Docker

docker run -d -p 11451:11451/udp -p 11451:11451/tcp spacemeowx2/switch-lan-play

Node

Use --port to pass the port parameter, or it will use 11451/udp as the default.

Use --simpleAuth to pass authentication via username and password, or there will be no authentication.

Use --httpAuth to pass authentication via HTTP URL, or there will be no authentication.

Use --jsonAuth to pass authentication via JSON file, or there will be no authentication.

Example:

Meanwhile, the monitor service will start on port 11451/tcp by default. You can get the online client count via an HTTP request:

Request: GET http://{YOUR_SERVER_IP}:11451/info

Response: { "online": 42 }

Protocol

The protocol is quite simple at the moment, but additional fields may be added to calculate network quality (packet loss, ping), such as timestamp, seq_id, etc.

The server can read IP addresses from the payload and save the source IP -> LAN IP to a cache table. If the target IP address shown in the payload doesn't match the cache, the packet is broadcast to the entire room.

Details

让你和你的朋友像在局域网一样玩游戏

How to install switch-lan-play

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2020-06-21; current version v0.2.3, with the latest 10 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
v0.2.32020-06-21Stable927 KBDownloadDownloadDownload
v0.2.22020-06-20Stable927 KBDownloadDownloadDownload
v0.2.12019-08-30Pre-release——DownloadDownload
v0.2.02019-08-30Pre-release——DownloadDownload
v0.1.02019-01-18Pre-release——DownloadDownload
v0.0.72018-12-21Pre-release198 KBDownloadDownloadDownload
v0.0.62018-11-29Pre-release——DownloadDownload
v0.0.52018-10-17Pre-release——DownloadDownload
v0.0.42018-10-16Pre-release——Download—
v0.0.32018-10-10Pre-release——Download—

Data from GitHub Releases; stable releases first, each group sorted newest first.

Prebuilt bottle platforms

Official Homebrew bottles cover:

  • Apple silicon · latest macOS
  • Apple silicon · macOS 26 Tahoe
  • Apple silicon · macOS 15 Sequoia
  • Apple silicon · macOS 14 Sonoma
  • Apple silicon · macOS 13 Ventura
  • arm64_monterey
  • arm64_big_sur
  • Intel · macOS 14 Sonoma
  • Intel · macOS 13 Ventura
  • Intel · macOS 12 Monterey
  • big_sur
  • Linux · ARM64
  • Linux · x86_64

Compared with similar apps

Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
switch-lan-playv0.2.3GPL-3.0-or-laterCLI3
vile9.8zbGPL-2.0-or-laterCLI3
makefile2graph2021.11.06MITCLI3
pyenv-ccache0.0.2MITCLI13

Similar apps: Command-line Tools

Leave a comment

评论表单加载中…