Commit 65a032f4 authored by 神楽坂玲奈's avatar 神楽坂玲奈

readme

parent 713fbd35
Pipeline #16682 passed with stages
in 48 seconds
......@@ -2,13 +2,24 @@
Railgun Tun
## env
## arg
- `LOCAL_ID` `REMOTE_ID` Must be opposite and between 0 and 255.
- `PROTO` Proto number.
- `LOCAL_SECRET` `REMOTE_SECRET` Must be opposite.
- `DEV` tun name.
- `UP_SCRIPT` `DOWN_SCRIPT` Optional. Script to run when tun is up and down.
- `ENDPOINT` Optional. Initial endpoint to connect to.
- `MARK` Optional. Mark to set on packets.
- `FAMILY` IPv6 if set to 6, otherwise 4.
```json5
{
"local_id": 1, // Must be opposite and between 0 and 255.
"local_secret": "0C/QIauVLpHo7rbPHefdrSu7bWLPbHgXL5kb3sDxzVw=", // base64 of 32 bytes secret
"routers": [
{
"remote_id": 2, // Must be opposite and between 0 and 255.
"proto": 1, // Proto number.
"mark": 1, // Mark to set on packets.
"family": 4, // IPv6 if set to 6, otherwise 4.
"endpoint": "1.1.1.1", // Optional. Initial endpoint to connect to.
"remote_secret": "aGGC9xcyV35dGtd1KpeFwqIu8dlTMom8qYD6/DaTF0k=", // base64 of 512 bits
"dev": "tun0", // tun name.
"up": "ip address add 10.201.1.1 peer 10.201.1.2 dev tun0; ip link set dev tun0 mtu 1422; ip link set tun0 up", // Script to run when tun is up and down.
"down": "echo down" // Script to run when tun is up and down.
}
]
}
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment