Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
shimmeris committed Jan 12, 2023
1 parent 9ea28ae commit 8f85605
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[README](README.md) | [中文文档](README_zh.md)

SCFProxy is a tool that implements multiple proxies based on cloud functions and API gateway functions provided by cloud
providers.
SCFProxy is a tool to implement HTTP proxy, SOCKS proxy, and reverse proxy based on cloud function and API gateway
provided by several cloud service providers.

# Installation

Expand Down Expand Up @@ -81,15 +81,15 @@ and then filling the corresponding role ARN into the ` sdk.toml` file.

## Query

The `scfproxy list` accepts five arguments `provider`, `region`, `http`, `socks`, `reverse`.
The `scfproxy list` accepts the following five parameters.

The `provider` parameter lists the currently supported cloud providers and can be filtered by
the `-m [http|socks|reverse]` parameter to find the providers that support a certain proxy.

The `region` argument is used to list the regions where the cloud provider can be deployed, and the `-p providers`
parameter is used to specify the cloud provider

The `http`, `socks`, `reverse` arguments are used to list the currently deployed proxies
* `provider` lists currently supported cloud providers and can be filtered by the `-m [http|socks|reverse]` parameter to
find the providers that support a certain proxy.
* `region` list regions where cloud provider can be deployed, and the `-p providers` parameter is used to specify the
cloud provider
* `http` Lists deployed HTTP proxies
* `socks` Lists deployed SOCKS proxies
* `reverse` List deployed reverse proxies

## HTTP proxy

Expand Down Expand Up @@ -144,6 +144,10 @@ equivalent to `0.0.0.0:port`
Running HTTP proxy will load the records in `~/.config/scfproxy/http.json`, and if there are multiple deployed cloud
functions (regardless of provider), each HTTP request will randomly pick one of them to proxy.

#### Use effect

![http](img/http.jpg)

### Clear

```console
Expand Down Expand Up @@ -186,7 +190,7 @@ randomly pick one of the connections from the cloud function to proxy.
> The current timeout for socks proxy functions is 15m, so if you use socks proxy for a long connection such as mysql
> connection, you need to schedule it by yourself to avoid accidental connection disconnection when the time is up.
### Usage effect
#### Use effect

**Long connections**

Expand Down
20 changes: 12 additions & 8 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SCFProxy

SCFProxy 是一个基于云服务商提供的云函数及 API 网关功能实现多种代理的工具
SCFProxy 是一个基于多个云服务商提供的云函数及 API 网关实现 HTTP 代理、SOCKS 代理、反向代理的工具

# 安装

Expand Down Expand Up @@ -75,13 +75,13 @@ AWS 需要下述凭证:

## 查询

`scfproxy list` 接受 `provider`, `region`, `http`, `socks`, `reverse` 五种参数。
`scfproxy list` 接受以下五种参数:

`provider` 参数列出目前支持的云厂商,可通过 `-m [http|socks|reverse]` 参数过滤出支持某种代理的厂商。

`region` 参数用于列出云厂商可部署的区域,需使用 `-p providers` 指定需要查看的云厂商

`http`, `socks`, `reverse` 参数用于列出目前已经部署的代理
* `provider` 用于列出目前支持的云厂商,可通过 `-m [http|socks|reverse]` 参数过滤出支持某种代理的厂商。
* `region` 用于列出云厂商可部署的区域,需使用 `-p providers` 指定需要查看的云厂商
* `http` 列出已部署的 HTTP 代理
* `socks` 列出已部署的 SOCKS 代理
* `reverse` 列出已部署的 反向代理

## HTTP 代理

Expand Down Expand Up @@ -131,6 +131,10 @@ scfproxy http -l address [-c cert_path] [-k key_path]
HTTP 代理运行将读取 `~/.config/scfproxy/http.json` 中的记录,如果存在多个已部署的云函数(不区分厂商),每个 HTTP
请求将随机挑选其中的云函数进行代理。

#### 使用效果

![http](img/http.jpg)

### 清理

```console
Expand Down Expand Up @@ -171,7 +175,7 @@ socks 命令需要加载 `sdk.toml` 用于触发函数,及部署后生成的 `
> 目前 socks 代理部署的函数超时时间为 15m,因此如果将 socks 代理用于一个长连接如 mysql 连接,需自行安排好时间,避免时间一到导致连接意外断开。
>
### 使用效果
#### 使用效果

**长连接**

Expand Down
Binary file added img/http.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8f85605

Please sign in to comment.