Commit 1a27ed4d authored by nanahira's avatar nanahira

readme

parent 57be6e65
Pipeline #457 passed with stages
in 9 minutes and 56 seconds
# gateway-selector
Gateway web selector with IPSet
## Direct install
1. Install Node and IPSet.
2. Clone this project.
3. `npm ci && npm run build`
4. Install frontend from (https://code.mycard.moe/pani/gateway-selector-web)[https://code.mycard.moe/pani/gateway-selector-web] and build it into `build/public`.
5. Copy `config.example.yaml` into `config.yaml` and make your changes.
6. `npm start`
## About IPSet
This project only make changes in IPSet of the host. You have to set rules in `iptables` to make full use.
## Docker
The Docker image is at `nanahira/gateway-selector` in DockerHub, or `git-registry.mycard.moe/nanahira/gateway-selector` in MyCard Git Service.
Must be run in `net: host` and the cap `NET_ADMIN`.
### Ports
* The port configured, mostly `80` for http or `443` for https.
### Volumes
* `/usr/src/app/config.yaml` for config file.
address: 0.0.0.0
port: 443
ssl:
ssl: # Your SSL certificate here. You may set this entire section into null to disable HTTPS.
cert: ./ssl/fullchain.pem
key: ./ssl/privkey.pem
trustedProxies:
trustedProxies: # Set this if behind reverse proxy.
- 127.0.0.1
title: Railgun
groups:
- name: Ladder Policy
description: Determine the routing of ladder.
allowedIPs:
title: Railgun # Title displayed in frontend.
groups: # Each ipset group. Each client can only be added into one set of each group.
- name: Ladder Policy # Group display name
description: Determine the routing of ladder. # Group display description
allowedIPs: # IP address CIDRs allowed to make changes in this group.
- 0.0.0.0/0
sets:
- name: GFWList
description: Routing sites inside GFWList to ladder.
setname: u_gfwlist
allowedIPs:
sets: # Each option (ipset) in group.
- name: GFWList # Option display name
description: Routing sites inside GFWList to ladder. # Option display description
setname: u_gfwlist # Related IPSet of this option.
allowedIPs: # IP address CIDRs allowed to be added in this ipset.
- 0.0.0.0/0
- name: CHNRoute
description: Route all non-mainland sites to ladder.
......
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