# How to configure

### Basic configuration

```
license = '3yZe7d.PA7JYq9iUbYbNFD2MKnoYw.j5NMxwstkkrxYCiNXe9rzWCFPYKtgaU8E83iUYV422N'

# tcp_fast_open = true

remote_addr = '1.1.1.1'
# 在未单独指定目标地址时都转发至该地址

[[single]]
port = 1000
true_ip = true
# 监听1000 端口并转发至目标地址1000 端口
# 开启TRUEIP

[[single]]
port = 2000
remote_port = 2001
# 监听2000 端口并转发至目标地址2001 端口

[[range]]
port = '3000-4000'
# 监听3000-4000 端口
```

### Advanced configuration

```
license = '3yZe7d.PA7JYq9iUbYbNFD2MKnoYw.j5NMxwstkkrxYCiNXe9rzWCFPYKtgaU8E83iUYV422N'

tcp_fast_open = true

listen_port = 1234
# 该程序监听的端口

interfaces = ['eth0']
# 绑定本机网卡（未指定时会自动绑定所有有效网卡）

remote_addr = '1.1.1.1'
# 在未单独指定目标地址时都转发至该地址

outbound = 'eth1'
# 控制出口连接绑定地址（支持网卡名称或IP）

[[single]]
port = 1000
remote_addr = '192.168.0.1'
remote_port = 1001
true_ip = true
# 监听1000 端口
# 不遵从全局设置，单独指定目标地址
# 转发至目标地址1001 端口
# 开启TRUEIP

[[single]]
port = 2000
proxy_protocol_v2 = true
# 监听2000 端口并转发至目标地址2000 端口
# 开启PROXY PROTOCOL V2

[[range]]
port = '3000-4000'
remote_addr = '1.1.1.1'
true_ip = true
# 监听3000-4000 端口
# 不遵从全局设置，单独指定目标地址
# 开启TRUEIP

# Load balancing (2022/08/20)

[[single]]
port = 5000

  [single.multiple]
  type = 'fallback'
  # type = 'iphash'

  [[single.multiple.upstreams]]
  remote_addr = 'jp1.razord.top'
  remote_port = 5000
  true_ip = false
  proxy_protocol_v2 = false

  [[single.multiple.upstreams]]
  remote_addr = 'jp2.razord.top'
  remote_port = 6000
  true_ip = false
  proxy_protocol_v2 = false
  
[[range]]
port = '10000-20000'

  [range.multiple]
  type = 'fallback'

  [[range.multiple.upstreams]]
  remote_addr = 'jp.razord.top'
  health_port = 10000
  true_ip = false
  proxy_protocol_v2 = false
```

### The simplest configuration

```
license = '3yZe7d.PA7JYq9iUbYbNFD2MKnoYw.j5NMxwstkkrxYCiNXe9rzWCFPYKtgaU8E83iUYV422N'

remote_addr = '192.168.0.2'

outbound = 'eth1'

[[single]]
port = 8080
true_ip = true

[[range]]
port = '10000-20000'
true_ip = true
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dler.io/hollow/the-formal-stuff/how-to-configure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
