From 5f48da2a7dfeed38c8c35ccc8daa903c25d4ffaa Mon Sep 17 00:00:00 2001 From: spacemeowx2 Date: Wed, 10 Jan 2024 14:26:25 +0800 Subject: [PATCH] update READMEs --- LICENSE.txt | 2 +- README.md | 29 +++++++++++++---------------- README_zh.md | 9 +++------ docker/Makefile.openwrt | 2 +- 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 82446d6..2a063fe 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - switch-lan-play: Make you and your friends play games like in a LAN. + switch-lan-play: Enjoy games with your friends as if you were on a LAN. Copyright (C) 2018 spacemeowx2 This program is free software: you can redistribute it and/or modify diff --git a/README.md b/README.md index 8c4bc16..53219d7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ English | [中文](README_zh.md) -Make you and your friends play games like in a LAN. +Enjoy games with your friends as if you were on a LAN. ``` Internet @@ -16,16 +16,13 @@ Switch <--------> PC(lan-play) <-------------> Server UDP ``` -**NOTE:** -* This project is in an early stage. The protocol may change frequently. - # Usage -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. +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/](http://lan-play.com/install-switch) for steps on how to set this up. See below for build instructions. +Visit [https://www.lan-play.com/](http://lan-play.com/install-switch) for instructions on how to set this up. See below for build instructions. ## SOCKS5 Proxy @@ -46,7 +43,7 @@ This project depends on libpcap, you can install libpcap0.8-dev on Ubuntu or Deb `sudo apt install libpcap0.8-dev git gcc g++ cmake` -Prepare a cmake, gcc, and run like this: +Prepare cmake and gcc, then run the following: ```sh mkdir build @@ -66,7 +63,7 @@ pacman -S make \ mingw-w64-x86_64-gcc ``` -To compile 32bit program: +To compile a 32-bit program: ```sh pacman -S mingw-w64-i686-cmake \ @@ -107,17 +104,17 @@ make git 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 run build # build ts to js. run it again when code changes. npm start ``` -Use `--port` pass the port parameter, or else it will use `11451/udp` as default. +Use `--port` to pass the port parameter, or it will use `11451/udp` as the default. -Use `--simpleAuth` pass the auth via username and password, or else there's no authentication. +Use `--simpleAuth` to pass authentication via username and password, or there will be no authentication. -Use `--httpAuth` pass the auth via http url, or else there's no authentication. +Use `--httpAuth` to pass authentication via HTTP URL, or there will be no authentication. -Use `--jsonAuth` pass the auth via json file, or else there's no authentication. +Use `--jsonAuth` to pass authentication via JSON file, or there will be no authentication. Example: @@ -126,7 +123,7 @@ npm 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: +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` @@ -135,7 +132,7 @@ Response: `{ "online": 42 }` # Protocol -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. +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. ```c struct packet { @@ -153,4 +150,4 @@ enum type { }; ``` -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). +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. diff --git a/README_zh.md b/README_zh.md index b6c2188..24e2b25 100644 --- a/README_zh.md +++ b/README_zh.md @@ -16,9 +16,6 @@ Switch <--------> PC(本工具) <-------------------> 服务器 UDP协议 ``` -**注意:** -* 这个项目正处于早期开发阶段,通信协议可能会频繁变化。 - # 用法 本工具分为服务端和客户端,你和朋友要在**各自的电脑**上运行 lan-play 客户端,并连接到**同一个**服务器,最后给 Switch 设置静态 IP 上网。 @@ -29,7 +26,7 @@ Switch <--------> PC(本工具) <-------------------> 服务器 1. 下载并安装最新的 [Npcap](https://nmap.org/npcap/#download) -2. 安装 Npcap 的时候记得选择 **Installed in WinPcap API-compatible mode** (以 WinPcap API 兼容模式安装) +2. 安装 Npcap 的时候记得选择 **Installed in WinPcap API-compatible mode** (以 WinPcap API 兼容模式安装) 3. 从 [releases](https://github.com/spacemeowx2/switch-lan-play/releases) 下载最新版 `lan-play.exe` 客户端 @@ -41,7 +38,7 @@ Switch <--------> PC(本工具) <-------------------> 服务器 --relay-server-addr is required (必须输入 --relay-server-addr 参数) Input the relay server address [ domain/ip:port ]: (输入中继服务器地址) ``` -你可以从这个网站里提供的公共中继服务器列表中选择一个 +你可以从这个网站提供的公共中继服务器列表中选择一个 https://www.lan-play.com/ 也可以到本项目的 Discord 群组里找人匹配 @@ -70,7 +67,7 @@ https://discord.gg/zEMCu5n -2. 点击保存,这时候 Switch 会开始通过你的电脑上网。 +2. 点击保存,这时 Switch 会开始通过你的电脑上网。 3. 启动游戏,然后按 L+R+LStick 进入局域网联机模式。 diff --git a/docker/Makefile.openwrt b/docker/Makefile.openwrt index 0166913..e6eafed 100755 --- a/docker/Makefile.openwrt +++ b/docker/Makefile.openwrt @@ -19,7 +19,7 @@ define Package/$(PKG_NAME) endef define Package/$(PKG_NAME)/description - Make you and your friends play games like in a LAN. + Enjoy games with your friends as if you were on a LAN. endef define Build/Prepare