feat(ssh): remove ssh-proxy-toggle script and add sshp-fg alias for SSH proxy

This commit is contained in:
Dmitry
2026-03-14 23:38:07 +03:00
parent 830bcff12d
commit 9e6122fcfa
4 changed files with 49 additions and 68 deletions
-27
View File
@@ -1,27 +0,0 @@
#!/bin/zsh
# Импортируем ваши переменные и функции
SSH_PROXY_PID_FILE="/tmp/ssh_proxy.pid"
sshp-status-check() {
[ -f "$SSH_PROXY_PID_FILE" ] && kill -0 $(cat "$SSH_PROXY_PID_FILE") 2>/dev/null
}
sshp-start() {
ssh -fN -D 127.0.0.1:1080 fl-vps
pgrep -f "ssh -fN -D 127.0.0.1:1080 fl-vps" > "$SSH_PROXY_PID_FILE"
notify-send "SSH Proxy" "SOCKS5 запущен на 1080" -i network-vpn
}
sshp-stop() {
PID=$(cat "$SSH_PROXY_PID_FILE")
kill "$PID" && rm -f "$SSH_PROXY_PID_FILE"
notify-send "SSH Proxy" "Прокси остановлен" -i network-disconnect
}
# Логика тумблера
if sshp-status-check; then
sshp-stop
else
sshp-start
fi
+9 -2
View File
@@ -6,13 +6,20 @@ Host vps vps-ada
IdentityFile ~/.ssh/id_ed25519_homelab IdentityFile ~/.ssh/id_ed25519_homelab
# ZimaOS # ZimaOS
Host home zima Host casa casaos casa-vm
HostName 100.124.120.78 HostName 100.87.138.76
User ada User ada
IdentityFile ~/.ssh/id_ed25519_homelab IdentityFile ~/.ssh/id_ed25519_homelab
SetEnv TERM=xterm-256color SetEnv TERM=xterm-256color
ProxyJump vps ProxyJump vps
Host pve
HostName 100.68.130.76
User root
IdentityFile ~/.ssh/id_ed25519_homelab
SetEnv TERM=xterm-256color
ProxyJump vps
Host git.ada-dev.ru Host git.ada-dev.ru
HostName 100.87.138.76 HostName 100.87.138.76
Port 222 Port 222
+38 -39
View File
@@ -85,25 +85,24 @@ tmux_conf_24b_colour=auto
# - tmux_conf_theme_synchronized # - tmux_conf_theme_synchronized
tmux_conf_theme=enabled tmux_conf_theme=enabled
# Catppuccin Frappe theme colors - cool blues # KDE Breeze Dark theme colors - neutral graphite with Plasma blue accents
# Cool cyan and blue tones tmux_conf_theme_colour_1="#232629" # panel background
tmux_conf_theme_colour_1="#232634" # crust - darkest tmux_conf_theme_colour_2="#3b4045" # brighter active surface
tmux_conf_theme_colour_2="#51576d" # surface1 - lighter gray tmux_conf_theme_colour_3="#7f8c8d" # lighter inactive text
tmux_conf_theme_colour_3="#626880" # surface2 - medium gray tmux_conf_theme_colour_4="#3daee9" # Plasma focus blue
tmux_conf_theme_colour_4="#99d1db" # sky - bright cyan-blue (active) tmux_conf_theme_colour_5="#6ccfff" # brighter highlight blue
tmux_conf_theme_colour_5="#8caaee" # blue - bright blue tmux_conf_theme_colour_6="#1b1e20" # shadow background
tmux_conf_theme_colour_6="#232634" # crust - darkest tmux_conf_theme_colour_7="#eff0f1" # primary text
tmux_conf_theme_colour_7="#c6d0f5" # text - light text tmux_conf_theme_colour_8="#232629" # panel background
tmux_conf_theme_colour_8="#232634" # crust - darkest tmux_conf_theme_colour_9="#2980b9" # deeper accent blue
tmux_conf_theme_colour_9="#85c1dc" # sapphire - bright sapphire-blue tmux_conf_theme_colour_10="#3daee9" # accent blue
tmux_conf_theme_colour_10="#99d1db" # sky - bright cyan tmux_conf_theme_colour_11="#27ae60" # positive state
tmux_conf_theme_colour_11="#81c8be" # teal - cool teal green tmux_conf_theme_colour_12="#f9d06b" # brighter warm highlight
tmux_conf_theme_colour_12="#babbf1" # lavender - cool lavender tmux_conf_theme_colour_13="#eff0f1" # primary text
tmux_conf_theme_colour_13="#c6d0f5" # text - light text tmux_conf_theme_colour_14="#232629" # panel background
tmux_conf_theme_colour_14="#232634" # crust - darkest tmux_conf_theme_colour_15="#444a50" # lifted secondary surface
tmux_conf_theme_colour_15="#414559" # surface0 - dark background tmux_conf_theme_colour_16="#da4453" # negative state
tmux_conf_theme_colour_16="#e78284" # red - bright red tmux_conf_theme_colour_17="#eff0f1" # primary text
tmux_conf_theme_colour_17="#c6d0f5" # text - light text
# window style # window style
tmux_conf_theme_window_fg="default" tmux_conf_theme_window_fg="default"
@@ -134,18 +133,18 @@ tmux_conf_theme_pane_indicator="$tmux_conf_theme_colour_4"
tmux_conf_theme_pane_active_indicator="$tmux_conf_theme_colour_4" tmux_conf_theme_pane_active_indicator="$tmux_conf_theme_colour_4"
# status line style # status line style
tmux_conf_theme_message_fg="$tmux_conf_theme_colour_1" tmux_conf_theme_message_fg="$tmux_conf_theme_colour_7"
tmux_conf_theme_message_bg="$tmux_conf_theme_colour_5" tmux_conf_theme_message_bg="$tmux_conf_theme_colour_4"
tmux_conf_theme_message_attr="bold" tmux_conf_theme_message_attr="bold"
# status line command style (<prefix> : Escape) # status line command style (<prefix> : Escape)
tmux_conf_theme_message_command_fg="$tmux_conf_theme_colour_5" tmux_conf_theme_message_command_fg="$tmux_conf_theme_colour_1"
tmux_conf_theme_message_command_bg="$tmux_conf_theme_colour_1" tmux_conf_theme_message_command_bg="$tmux_conf_theme_colour_5"
tmux_conf_theme_message_command_attr="bold" tmux_conf_theme_message_command_attr="bold"
# window modes style # window modes style
tmux_conf_theme_mode_fg="$tmux_conf_theme_colour_1" tmux_conf_theme_mode_fg="$tmux_conf_theme_colour_1"
tmux_conf_theme_mode_bg="$tmux_conf_theme_colour_5" tmux_conf_theme_mode_bg="$tmux_conf_theme_colour_12"
tmux_conf_theme_mode_attr="bold" tmux_conf_theme_mode_attr="bold"
# status line style # status line style
@@ -192,26 +191,26 @@ tmux_conf_theme_window_status_format="#I #W#{?#{||:#{window_bell_flag},#{window_
# - #{hostname_full_ssh} # - #{hostname_full_ssh}
# - #{username} # - #{username}
# - #{username_ssh} # - #{username_ssh}
tmux_conf_theme_window_status_current_fg="$tmux_conf_theme_colour_1" tmux_conf_theme_window_status_current_fg="$tmux_conf_theme_colour_4"
tmux_conf_theme_window_status_current_bg="$tmux_conf_theme_colour_4" tmux_conf_theme_window_status_current_bg="$tmux_conf_theme_colour_2"
tmux_conf_theme_window_status_current_attr="bold" tmux_conf_theme_window_status_current_attr="bold"
tmux_conf_theme_window_status_current_format="#I #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}" tmux_conf_theme_window_status_current_format="#I #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}"
#tmux_conf_theme_window_status_current_format="#{circled_window_index} #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}" #tmux_conf_theme_window_status_current_format="#{circled_window_index} #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}"
#tmux_conf_theme_window_status_current_format="#I #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}" #tmux_conf_theme_window_status_current_format="#I #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}"
# window activity status style # window activity status style
tmux_conf_theme_window_status_activity_fg="default" tmux_conf_theme_window_status_activity_fg="$tmux_conf_theme_colour_7"
tmux_conf_theme_window_status_activity_bg="default" tmux_conf_theme_window_status_activity_bg="$tmux_conf_theme_colour_15"
tmux_conf_theme_window_status_activity_attr="underscore" tmux_conf_theme_window_status_activity_attr="none"
# window bell status style # window bell status style
tmux_conf_theme_window_status_bell_fg="$tmux_conf_theme_colour_5" tmux_conf_theme_window_status_bell_fg="$tmux_conf_theme_colour_7"
tmux_conf_theme_window_status_bell_bg="default" tmux_conf_theme_window_status_bell_bg="$tmux_conf_theme_colour_16"
tmux_conf_theme_window_status_bell_attr="blink,bold" tmux_conf_theme_window_status_bell_attr="bold"
# window last status style # window last status style
tmux_conf_theme_window_status_last_fg="$tmux_conf_theme_colour_4" tmux_conf_theme_window_status_last_fg="$tmux_conf_theme_colour_5"
tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_2" tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_15"
tmux_conf_theme_window_status_last_attr="none" tmux_conf_theme_window_status_last_attr="none"
# status left/right sections separators # status left/right sections separators
@@ -256,13 +255,13 @@ tmux_conf_theme_status_left=" ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d
tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized}#{?battery_status,#{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} " tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized}#{?battery_status,#{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} "
# status left style # status left style
tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_1,$tmux_conf_theme_colour_1,$tmux_conf_theme_colour_1" tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_1,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_7"
tmux_conf_theme_status_left_bg="$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11" tmux_conf_theme_status_left_bg="$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_2,$tmux_conf_theme_colour_15"
tmux_conf_theme_status_left_attr="bold,none,none" tmux_conf_theme_status_left_attr="bold,none,none"
# status right style # status right style
tmux_conf_theme_status_right_fg="$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14" tmux_conf_theme_status_right_fg="$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_1"
tmux_conf_theme_status_right_bg="$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17" tmux_conf_theme_status_right_bg="$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_2,$tmux_conf_theme_colour_10"
tmux_conf_theme_status_right_attr="none,none,bold" tmux_conf_theme_status_right_attr="none,none,bold"
# pairing indicator # pairing indicator
@@ -341,7 +340,7 @@ tmux_conf_battery_status_discharging="↓" # U+2193
# clock style (when you hit <prefix> + t) # clock style (when you hit <prefix> + t)
# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right # you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right
tmux_conf_theme_clock_colour="$tmux_conf_theme_colour_4" tmux_conf_theme_clock_colour="$tmux_conf_theme_colour_10"
tmux_conf_theme_clock_style="24" tmux_conf_theme_clock_style="24"
+2
View File
@@ -170,3 +170,5 @@ alias lidon='sudo systemctl mask sleep.target suspend.target hibernate.target hy
alias lidoff='sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target' alias lidoff='sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target'
# alias gemini='NODE_NO_WARNINGS=1 npx @google/gemini-cli' # alias gemini='NODE_NO_WARNINGS=1 npx @google/gemini-cli'
alias sshvpn='sshuttle --dns -r fl-vps 0/0 -X ~/.dotfiles/configs/.exclude-ip.txt' alias sshvpn='sshuttle --dns -r fl-vps 0/0 -X ~/.dotfiles/configs/.exclude-ip.txt'
alias sshp-fg='ssh -D 127.0.0.1:1080 fl-vps -v sleep 9999'