From f795986bf99a044151b68fd628ecb1e254eb0d4d Mon Sep 17 00:00:00 2001 From: jie65535 Date: Sun, 10 Apr 2022 15:02:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0V2Ray=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- network/V2Ray.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 network/V2Ray.md diff --git a/network/V2Ray.md b/network/V2Ray.md new file mode 100644 index 0000000..fcc5bee --- /dev/null +++ b/network/V2Ray.md @@ -0,0 +1,19 @@ +# #V2Ray 初体验 + +> 由于SS线路中转服务器框架炸了,全线vemms,因此尝试使用V2Ray作为客户端 + +## 安装 +在完全没用过V2Ray的情况下,我第一反应选择从Github中搜索资源。 + +[V2Ray搜索结果](https://github.com/search?q=V2Ray) + +稍一筛选,发现[v2rayN](https://github.com/2dust/v2rayN)这个应该就是我想要的。 + +根据介绍,我应该直接下载`v2rayN-core.zip` +> If you are newbie please download v2rayN-Core.zip from releases +> Otherwise please download v2rayN.zip (Also need to download v2ray core in the same folder) +> Run v2rayN.exe + +下载完成解压后,阅读文档,直接运行`v2rayN.exe` + +复制vmess地址,从剪贴板导入,重启服务,系统代理切换至`自动配置系统代理`即可。 From d03b4faf91d17275342387a9802b3d5b891e131e Mon Sep 17 00:00:00 2001 From: jie65535 Date: Sat, 23 Apr 2022 16:27:40 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20bore=20systemd=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux/systemd.md | 5 +++++ rust/bore.md | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 linux/systemd.md diff --git a/linux/systemd.md b/linux/systemd.md new file mode 100644 index 0000000..4bacdf5 --- /dev/null +++ b/linux/systemd.md @@ -0,0 +1,5 @@ + + +# systemd + +https://cloud.tencent.com/developer/article/1516125 \ No newline at end of file diff --git a/rust/bore.md b/rust/bore.md index 7b571f5..2666ddb 100644 --- a/rust/bore.md +++ b/rust/bore.md @@ -37,6 +37,45 @@ $ bore local 22 --to jie65535.top --port 9022 2022-04-21T09:11:39.835322Z INFO bore_cli::client: listening at jie65535.top:9022 ``` +## systemd 服务 +用 `cargo install bore-cli` 安装后执行 `sudo ln -s ~/.cargo/bin/bore /usr/bin` 创建软连接。 + +然后在 `/etc/systemd/system` 目录下新建 `bore.service`,添加以下内容 +``` +[Unit] +Description=bore service +After=network-online.target +Wants=network-online.target + +[Service] +ExecStart=bore server +Restart=always +RestartSec=60s +User=root + +[Install] +WantedBy=default.target +``` +接着执行 `sudo systemctl enable bore.service` 即可开机自启。 +用 `sudo systemctl start bore.service` 来启动服务。 +用 `sudo systemctl status bore.service` 查看状态。 +这些都是 `systemd` 的基操了,不多赘述。 +成功的话状态会输出以下信息 +``` +$ sudo systemctl status bore.service +● bore.service - bore service + Loaded: loaded (/etc/systemd/system/bore.service; enabled; vendor preset: enabled) + Active: active (running) since Sat 2022-04-23 16:20:01 CST; 2min 55s ago + Main PID: 241914 (bore) + Tasks: 3 (limit: 11738) + Memory: 288.0K + CGroup: /system.slice/bore.service + └─241914 /usr/bin/bore server + +Apr 23 16:20:01 iZwz9ejck3djoyghr9h865Z systemd[1]: Started bore service. +Apr 23 16:20:01 iZwz9ejck3djoyghr9h865Z bore[241914]: 2022-04-23T08:20:01.902721Z INFO bore_cli::server: server listening addr=0.0.0.0:7835 +``` + ## 服务端帮助 ``` bore-server 0.3.0 From 3c87da9e6a854c95e3ad13f8e00d9bc8bbb3e8ef Mon Sep 17 00:00:00 2001 From: jie65535 Date: Sat, 23 Apr 2022 20:27:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20bore=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E8=AF=B4=E6=98=8E=20=E6=9B=B4=E6=96=B0=20?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=96=87=E6=A1=A3=E6=8C=87=E5=BC=95=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust/bore.md | 13 +++++++++++++ rust/install-rust.md | 2 ++ 2 files changed, 15 insertions(+) diff --git a/rust/bore.md b/rust/bore.md index 2666ddb..656c143 100644 --- a/rust/bore.md +++ b/rust/bore.md @@ -76,6 +76,19 @@ Apr 23 16:20:01 iZwz9ejck3djoyghr9h865Z systemd[1]: Started bore service. Apr 23 16:20:01 iZwz9ejck3djoyghr9h865Z bore[241914]: 2022-04-23T08:20:01.902721Z INFO bore_cli::server: server listening addr=0.0.0.0:7835 ``` +## 安全访问 +可以通过 `--secret ` 参数来保护服务器不被其他人使用,当然,这只是保护握手阶段,后续不会进一步加密流量。 + +就像这样 +``` +# on the server +bore server --secret my_secret_string + +# on the client +bore local --to --secret my_secret_string +``` + + ## 服务端帮助 ``` bore-server 0.3.0 diff --git a/rust/install-rust.md b/rust/install-rust.md index 5d0fe50..b826f9a 100644 --- a/rust/install-rust.md +++ b/rust/install-rust.md @@ -3,6 +3,8 @@ tags: #rust --- # 安装Rust环境 +[官方文档](https://doc.rust-lang.org/cargo/getting-started/installation.html) + 从`https://sh.rustup.rs`获取安装脚本,执行脚本安装 ```bash