-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
579 additions
and
697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
title: 快速开始 | ||
date: 2022-09-28 00:27:13 | ||
permalink: /guide/start/ | ||
article: false | ||
--- | ||
|
||
# 快速开始 | ||
|
||
通过该页面,您可以快速的通过客户端来创建一个 http 代理服务,作为月海的基本使用演示。 | ||
|
||
### 事前准备 | ||
|
||
+ 云厂商账户(以阿里云为例),并开通对应的serverless服务(阿里云serverless服务名为:函数计算) | ||
+ 云厂商账户 AK/SK,并拥有操作函数和账单相关的全部权限。 | ||
|
||
|
||
### 启动服务 | ||
|
||
`$ docker run -it -d --net=host dvkunion/seamoon:latest proxy` | ||
|
||
如果一切正常,你将可以在 `http://localhost:7777` 访问到管理页面: | ||
|
||
![login](https://seamoon.oss-cn-hangzhou.aliyuncs.com/fbc14247042b4608a99b18fce6682175.png) | ||
|
||
:::tip | ||
默认的账户密码为: seamoon/seamoon | ||
::: | ||
|
||
:::warning | ||
安全起见,我们不建议直接通过 --net=host 将所有的端口直接暴露在网络中,更加推荐的做法请继续阅读: [客户端安装](https://seamoon.dvkunion.cn/guide/install/) | ||
::: | ||
|
||
### 修改默认密码 | ||
|
||
第一步一定要修改掉默认的密码。点击 [系统管理],填写一个新的密码,然后提交: | ||
|
||
![password](https://seamoon.oss-cn-hangzhou.aliyuncs.com/b87e34d7b9114fabb1404ce99eef3097.png) | ||
|
||
### 配置账户 | ||
|
||
我们来尝试创建一个账户, 点击 [云账户管理] -> [新增]: | ||
|
||
![add-account](https://seamoon.oss-cn-hangzhou.aliyuncs.com/d580190a2ba74c178e1d5e239f2d82e3.png) | ||
|
||
填写对应的字段: | ||
+ 账户名称: 用于在客户端区分不同的账户,与具体云账户用户名无关 | ||
+ 账户类型: 选择账户对应的云平台类型 | ||
+ 最大部署限制: 该账户最多允许部署的函数数量,0表示不作限制。 | ||
+ 账户描述: 用于备注该账户的一些其他信息 | ||
|
||
![aliyun](https://seamoon.oss-cn-hangzhou.aliyuncs.com/d5e68b2e29754a68b1640c33c3b13bb0.png) | ||
|
||
点击下一步,继续填写表单: | ||
+ 账户允许部署区域: 表示当前账户允许部署的函数区域,可以多选 | ||
+ AccessID/AccessKey/SecretKey: 阿里云账户信息, AccountId 可在主页右上角个人信息处获取 accountId, AccessKeyId/AccessKeySecret 可在 [IAM](https://ram.console.aliyun.com/users) 页面添加子用户生成密钥 | ||
|
||
![aliyun-account](https://seamoon.oss-cn-hangzhou.aliyuncs.com/75c7aa76665740878c796d82aac17233.png) | ||
|
||
点击提交,账户会开始自动同步余额信息、函数信息等等。等待账户显示为正常状态时,即表示该步骤正确完成。 | ||
|
||
![success](https://seamoon.oss-cn-hangzhou.aliyuncs.com/93e870aab1ba4519be7b1ddf6552155f.png) | ||
|
||
如果出现错误,鼠标放置在状态处,即可显示错误详细信息。 | ||
|
||
![error](https://seamoon.oss-cn-hangzhou.aliyuncs.com/19d4ea3949934efe86666478d5daab0c.png) | ||
|
||
### 创建服务 | ||
|
||
可以开始创建服务了, 点击 [服务] -> [新增]: | ||
|
||
![add-service](https://seamoon.oss-cn-hangzhou.aliyuncs.com/12b854194e504602aeff41c8c58d9399.png) | ||
|
||
对应的参数比较多,我们首先填写第一张表单: | ||
|
||
+ 代理名称: 用于在客户端展示的代理名 | ||
+ 监听协议: 选择 http | ||
+ 监听地址: 不需要改动 | ||
+ 监听端口: 不需要改动(默认1080) | ||
|
||
![proxy](https://seamoon.oss-cn-hangzhou.aliyuncs.com/ab82aa10192049c28157856acc8e8be8.png) | ||
|
||
点击下一步,选择 [选择账户并自动创建新实例] | ||
|
||
![new-instance](https://seamoon.oss-cn-hangzhou.aliyuncs.com/ebe49e967ee94feabde0855691e79c08.png) | ||
|
||
点击下一步,选择刚才创建好的账户 | ||
|
||
![select-account](https://seamoon.oss-cn-hangzhou.aliyuncs.com/6cfd9c34857047a5805140d4c51aef7c.png) | ||
|
||
点击下一步,开始填写函数参数 | ||
|
||
+ 函数名称: 函数的名称,只允许英文 | ||
+ 函数所在区域: 只能选择账户允许的区域内部署 | ||
|
||
![func](https://seamoon.oss-cn-hangzhou.aliyuncs.com/367928eaf3ed4d3b9745a1a6976e05a0.png) | ||
|
||
其他选项均不需要改动,点击提交。 | ||
|
||
![create](https://seamoon.oss-cn-hangzhou.aliyuncs.com/14ea9dfdf588445398aa8cca7be187a9.png) | ||
|
||
### 开始使用 | ||
|
||
现在我们可以测试一下了。在终端输入: | ||
|
||
```shell | ||
export https_proxy=http://127.0.0.1:1080 http_proxy=http://127.0.0.1:1080 all_proxy=http://127.0.0.1:1080 | ||
``` | ||
|
||
然后查一下 IP: | ||
|
||
```shell | ||
curl cip.cc | ||
``` | ||
|
||
如果显示为阿里云 IP,表明代理已经生效。 | ||
|
||
![ip](https://seamoon.oss-cn-hangzhou.aliyuncs.com/a88026e1cdab45f987c5cc66b6f81034.png) | ||
|
||
同时服务页面会显示当前对应的延迟、连接数以及流量统计汇总。 | ||
|
||
![total](https://seamoon.oss-cn-hangzhou.aliyuncs.com/d819adccb751498fa2c3c82bae465024.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: 客户端安装 | ||
date: 2024-04-02 18:42:45 | ||
permalink: /guide/install/ | ||
article: false | ||
--- | ||
|
||
# 客户端安装 | ||
|
||
### Docker | ||
|
||
推荐使用 docker 一键部署client | ||
|
||
```shell | ||
$ docker run -it -d --net=host dvkunion/seamoon:latest proxy | ||
``` | ||
|
||
默认使用`--net=host`模式,这样比较简单易懂。为了更高的安全性、可控性,你也可以自己选择映射: | ||
|
||
```shell | ||
$ docker run -it -d -p 127.0.0.1:7777:7777 -p 1080:1080 dvkunion/seamoon:latest proxy | ||
``` | ||
|
||
这样可以将管理端口限制只能通过本地 `127.0.0.1` 访问,如果你需要限制为其他 IP,可以自行修改。 | ||
|
||
然后浏览器打开: | ||
|
||
`localhost:7777` | ||
|
||
即可开启客户端 | ||
|
||
### Binary | ||
|
||
#### 客户端下载 | ||
|
||
在 [Github Release](https://github.com/DVKunion/SeaMoon/releases) 界面。在最新版本列表哪,选择您对应系统型号的client 包下载。 | ||
|
||
![release](https://seamoon.oss-cn-hangzhou.aliyuncs.com/955161ed6d3c48b181397bed1bcaca45.png) |
Oops, something went wrong.