Skip to content

Commit

Permalink
fix: vless isn't available in custom provider
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Mar 18, 2024
1 parent 89ce2cc commit 06d3efd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/provider/CustomProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
SnellNodeConfigValidator,
TuicNodeConfigValidator,
Hysteria2NodeConfigValidator,
VlessNodeConfigValidator,
} from '../validators'
import { GetNodeListFunction, GetNodeListParams } from './types'

Expand Down Expand Up @@ -84,6 +85,7 @@ export default class CustomProvider extends Provider {
throw new Error('obfs-uri 已废弃, 请使用 obfsUri')
}

// istanbul ignore next
let parsedNode = (() => {
switch (type) {
case NodeTypeEnum.Shadowsocks:
Expand Down Expand Up @@ -119,6 +121,9 @@ export default class CustomProvider extends Provider {
case NodeTypeEnum.Hysteria2:
return Hysteria2NodeConfigValidator.parse(node)

case NodeTypeEnum.Vless:
return VlessNodeConfigValidator.parse(node)

default:
throw new TypeError(`无法识别的节点类型:${type}`)
}
Expand Down

0 comments on commit 06d3efd

Please sign in to comment.