mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 12:56:59 +08:00
riot: add . for .ibd and non for proxied
This commit is contained in:
parent
8fdd3c477f
commit
2019f16e56
|
@ -13,8 +13,11 @@ get_server_meta()
|
||||||
{
|
{
|
||||||
local domain=${1##*.}
|
local domain=${1##*.}
|
||||||
local host=${1%.*}
|
local host=${1%.*}
|
||||||
|
if [[ -z "$domain" ]]; then
|
||||||
|
domain="ibd"
|
||||||
|
fi
|
||||||
if [[ "$host" == "$domain" ]]; then
|
if [[ "$host" == "$domain" ]]; then
|
||||||
domain=""
|
domain="proxied"
|
||||||
fi
|
fi
|
||||||
case $domain in
|
case $domain in
|
||||||
ibd|ebd )
|
ibd|ebd )
|
||||||
|
@ -28,7 +31,7 @@ get_server_meta()
|
||||||
SSH_USERNAME=dictxiong
|
SSH_USERNAME=dictxiong
|
||||||
SSH_OPTIONS='-o ProxyJump="ssh@nasp.ob.ac.cn:36022"'
|
SSH_OPTIONS='-o ProxyJump="ssh@nasp.ob.ac.cn:36022"'
|
||||||
;;
|
;;
|
||||||
"" )
|
proxied )
|
||||||
SERVER=proxy.beardic.cn
|
SERVER=proxy.beardic.cn
|
||||||
local tmp=$(sha256sum <<< "$host" | tr -cd "[:digit:]")
|
local tmp=$(sha256sum <<< "$host" | tr -cd "[:digit:]")
|
||||||
tmp=${tmp:0:4}
|
tmp=${tmp:0:4}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user