Skip to content

Commit

Permalink
feat: 支持从 Clash 订阅中读取 skipCertVerify
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Dec 29, 2019
1 parent 3d38c8f commit c856731
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/provider/ClashProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ async function requestConfigFromRemote(url: string, udpRelay?: boolean): Promise
obfs: item['plugin-opts'].tls === true ? 'wss' : 'ws',
'obfs-host': item['plugin-opts'].host || item.server,
'obfs-uri': item['plugin-opts'].path || '/',
skipCertVerify: item['plugin-opts']['skip-cert-verify'] === true,
} : null),
};

Expand All @@ -142,6 +143,7 @@ async function requestConfigFromRemote(url: string, udpRelay?: boolean): Promise
path: _.get(item, 'ws-path', '/'),
host: _.get(item, 'ws-headers.Host', ''),
} : null),
skipCertVerify: item['skip-cert-verify'] === true,
};

case 'http':
Expand All @@ -158,6 +160,7 @@ async function requestConfigFromRemote(url: string, udpRelay?: boolean): Promise
port: item.port,
username: item.username || '',
password: item.password || '',
skipCertVerify: item['skip-cert-verify'] === true,
};

case 'snell':
Expand Down

0 comments on commit c856731

Please sign in to comment.