mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
订阅增加代理参数
This commit is contained in:
@@ -43,7 +43,13 @@ export default class SshKeyService {
|
||||
host: string,
|
||||
proxy?: string,
|
||||
): string {
|
||||
return `\nHost ${alias}\n Hostname ${host}\n IdentityFile ${this.sshPath}/${alias}\n StrictHostKeyChecking no\n`;
|
||||
if (host === 'github.com' && proxy) {
|
||||
host = 'ssh.github.com';
|
||||
}
|
||||
const proxyStr = proxy
|
||||
? ` Port 443\n HostkeyAlgorithms +ssh-rsa\n PubkeyAcceptedAlgorithms +ssh-rsa\n ProxyCommand nc -v -x ${proxy} %h %p\n`
|
||||
: '';
|
||||
return `\nHost ${alias}\n Hostname ${host}\n IdentityFile ${this.sshPath}/${alias}\n StrictHostKeyChecking no\n${proxyStr}`;
|
||||
}
|
||||
|
||||
private generateSshConfig(configs: string[]) {
|
||||
|
||||
Reference in New Issue
Block a user