update
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
## caddyfile
|
||||
|
||||
docker run -d -p 80:80 --name caddy -v ~/.config/www:/data -v ~/.config/caddy:/etc/caddy caddy
|
||||
|
||||
```bash
|
||||
*.nps.veypi.com:80 {
|
||||
reverse_proxy 127.0.0.1:800
|
||||
|
||||
@@ -8,4 +8,31 @@ ssh -R 8022:localhost:2017 user@ip -N
|
||||
|
||||
# 将远程服务器的 8022 端口映射到本地的 2017 端口
|
||||
ssh -L 2017:localhost:8022 user@ip -N
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
# auto ssh proxy
|
||||
|
||||
ssh -C -N -R remote_port:localhost:local_port username@remote_server
|
||||
|
||||
vim /etc/systemd/system/vautossh.service
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=AutoSSH tunnel service for reverse port forwarding
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment="AUTOSSH_GATETIME=0"
|
||||
ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -C -N -R remote_port:localhost:local_port username@remote_server
|
||||
Restart=always
|
||||
User=your_username
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable vautossh.service
|
||||
|
||||
@@ -33,7 +33,6 @@ tmux attach -t $1
|
||||
```
|
||||
|
||||
## .tmux.conf
|
||||
|
||||
```bash
|
||||
# ln -s $(pwd)/tmux.conf ~/.tmux.conf
|
||||
|
||||
@@ -47,20 +46,14 @@ bind r source-file ~/.tmux.conf \; display-message "Config reloaded.."
|
||||
# 打开鼠标 调整面板 切换面板
|
||||
set-option -g mouse on
|
||||
|
||||
|
||||
|
||||
set -g base-index 1 # 设置窗口的起始下标为1
|
||||
set -g pane-base-index 1 # 设置面板的起始下标为1
|
||||
|
||||
|
||||
unbind '"'
|
||||
bind - splitw -v -c '#{pane_current_path}' # 垂直方向新增面板,默认进入当前目录
|
||||
unbind %
|
||||
bind = splitw -h -c '#{pane_current_path}' # 水平方向新增面板,默认进入当前目录
|
||||
|
||||
|
||||
|
||||
|
||||
set -g status-interval 1 # 状态栏刷新时间
|
||||
set -g status-justify left # 状态栏列表左对齐
|
||||
setw -g monitor-activity on # 非当前窗口有内容更新时在状态栏通知
|
||||
|
||||
Reference in New Issue
Block a user