mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-06 03:58:16 +08:00
Compare commits
9 Commits
v1.2-beta
...
cba76bd304
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cba76bd304 | ||
|
|
5f27592fb4 | ||
|
|
3c10ebfaeb | ||
|
|
b33604ac14 | ||
|
|
00b7a550ab | ||
|
|
8f3b053bbd | ||
|
|
8eb2088331 | ||
|
|
d6d3167de3 | ||
|
|
2019f16e56 |
@@ -29,6 +29,10 @@ get_server_meta() {
|
||||
# presets -- match domain
|
||||
local domain=${remote##*.}
|
||||
local host=${remote%.*}
|
||||
# if ends with dot
|
||||
if [[ -z "$domain" ]]; then
|
||||
domain="ibd"
|
||||
fi
|
||||
# if there's no dot
|
||||
if [[ "$host" == "$domain" ]]; then
|
||||
domain="ibd"
|
||||
@@ -47,7 +51,7 @@ get_server_meta() {
|
||||
RET_JUMP_SERVER="ssh@nasp.ob.ac.cn:36022"
|
||||
RET_TRUST_SERVER=1
|
||||
;;
|
||||
x|proxied )
|
||||
proxied )
|
||||
RET_HOSTNAME=proxy.beardic.cn
|
||||
local tmp=$(sha256sum <<< "$host" | tr -cd "[:digit:]")
|
||||
tmp=${tmp:0:4}
|
||||
@@ -56,7 +60,7 @@ get_server_meta() {
|
||||
RET_TRUST_SERVER=1
|
||||
;;
|
||||
* )
|
||||
test -z "$domain" || fmt_warning "unknown domain: \"$domain\". will try as host name"
|
||||
fmt_warning "unknown domain: $domain. will try as host name"
|
||||
RET_HOSTNAME="$remote"
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -79,10 +79,6 @@ all()
|
||||
|
||||
route()
|
||||
{
|
||||
os_type="$(get_os_type)"
|
||||
if [[ "$os_type" == "msys" || "$os_type" == "cygwin" ]]; then
|
||||
fmt_fatal "unsupported platform: $os_type. you may use WinCryptSSHAgent."
|
||||
fi
|
||||
if [[ $# -eq 0 ]]; then
|
||||
all
|
||||
return
|
||||
|
||||
@@ -31,7 +31,6 @@ test $(echo n | tools/common.sh ask_for_yN "test") = "0"
|
||||
test $(echo | tools/common.sh ask_for_yN "test") = "0"
|
||||
test $(echo | tools/common.sh ask_for_Yn "test") = "1"
|
||||
test $(DFS_QUIET=1 tools/common.sh ask_for_Yn "test") = "1"
|
||||
test "$(DFS_TRUST=1 riot time@is.impt:2222,yes@you-r.right,you@are.really.recht.,ibd.,try@it scp /tmp/ ./tmp -D 2>/dev/null)" = 'scp -P 12022 -o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes -o ProxyJump=time@is.impt:2222,yes@you-r.right,you@are.really.recht.,ibd. -r try@it.ibd.ink:"/tmp/" "./tmp"'
|
||||
|
||||
# check alias
|
||||
alias p114
|
||||
|
||||
Reference in New Issue
Block a user