Skip to content

Commit

Permalink
add doc for v0.56.0 (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatedier authored Apr 9, 2024
1 parent 66067f8 commit 41e2bea
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
20 changes: 20 additions & 0 deletions content/zh-cn/docs/Features/common/range.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "端口范围映射"
weight: 80
---

*Added in v0.56.0*

我们可以利用 Go template 的 range 语法结合内置的 `parseNumberRangePair` 函数来实现端口范围映射。

下面的示例,应用运行后会创建 8 个代理,名称为 `test-6000, test-6001 ... test-6007`,分别将远端的端口映射到本地。

```
{{- range $_, $v := parseNumberRangePair "6000-6006,6007" "6000-6006,6007" }}
[[proxies]]
name = "tcp-{{ $v.First }}"
type = "tcp"
localPort = {{ $v.First }}
remotePort = {{ $v.Second }}
{{- end }}
```
2 changes: 0 additions & 2 deletions content/zh-cn/docs/Features/common/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ frp 支持在 frps 端监听一个 ssh 端口,通过走 ssh -R 协议来完成

SSH 反向隧道代理和通过 frp 代理 SSH 端口是不同的 2 个概念。SSH 反向隧道代理本质上是在你不想使用 frpc 的时候,通过 ssh client 连接 frps 来完成基本的反向代理。



## 参数

```toml
Expand Down
7 changes: 7 additions & 0 deletions content/zh-cn/docs/Reference/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ description: >
| Field | Type | Description | Required |
| :--- | :--- | :--- | :--- |
| set | map[string]string | 在 Header 中设置指定的 KV 值。 | No |

### HTTPHeader

| Field | Type | Description | Required |
| :--- | :--- | :--- | :--- |
| name | string | Header 名称。 | Yes |
| value | string | Header 值。 | Yes |
1 change: 1 addition & 0 deletions content/zh-cn/docs/Reference/proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ description: >
| maxFailed | int | 健康检查连续错误次数,连续检查错误多少次认为服务不健康,默认为 1。 | No |
| intervalSeconds | int | 健康检查周期(秒),每隔多长时间进行一次健康检查,默认为 10s。 | No |
| path | string | 健康检查的 HTTP 接口,如果健康检查类型是 http,则需要配置此参数,指定发送 http 请求的 path,例如 `/health`| No |
| httpHeaders | [[]HTTPHeader](../common#httpheader) | 健康检查的 HTTP 请求头,仅在健康检查类型是 http 时生效。 | No |

### DomainConfig

Expand Down

0 comments on commit 41e2bea

Please sign in to comment.