Quick Start¶
Zero Configuration
You can run GOST directly from the command line without additional configuration files.
Proxy Mode¶
Start one or more proxy services, and can be forwarded through the forwarding chain.
HTTP Proxy¶
Start an HTTP proxy service listening on port 8080:
Multiple Services¶
Start two services, an HTTP proxy service listening on port 8080, and a SOCKS5 proxy service listening on port 1080:
Forwading¶
Start an HTTP proxy service listening on port 8080, and use 192.168.1.1:8080 as the upper-level proxy for forwarding:
Multi-level Forwarding Chain¶
GOST finally forwards the request to 192.168.1.2:1080 through the forwarding chain in the order set by -F
:
services:
- name: service-0
addr: ":8080"
handler:
type: auto
chain: chain-0
listener:
type: tcp
chains:
- name: chain-0
hops:
- name: hop-0
nodes:
- name: node-0
addr: 192.168.1.1:8080
connector:
type: http
dialer:
type: tcp
- name: hop-1
nodes:
- name: node-0
addr: 192.168.1.2:1080
connector:
type: socks5
dialer:
type: tcp
Forwarding Mode¶
TCP Local Port Forwarding¶
Map local TCP port 8080 to port 80 of 192.168.1.1, all data sent to the local port 8080 will be forwarded to 192.168.1.1:80.
UDP Local Port Forwarding¶
Map local UDP port 10053 to port 53 of 192.168.1.1, all data sent to the local port 10053 will be forwarded to 192.168.1.1:53.
TCP Local Port Forwarding (With Chain)¶
Map local TCP port 8080 to port 80 of 192.168.1.2 through the forwarding chain chain-0
.
TCP Remote Port Forwarding¶
Listen on TCP port 2222 on 192.168.1.2, and map it to local TCP port 22, all data sent to 192.168.1.2:2222 will be forwarded to local port 22.
UDP Remote Port Forwarding¶
Listen on UDP port 10053 on 192.168.1.2, and map it to local UDP port 53, all data sent to 192.168.1.2:10053 will be forwarded to local port 53.