diff --git a/src/utils/clash.ts b/src/utils/clash.ts index 47dd6006..d9523815 100644 --- a/src/utils/clash.ts +++ b/src/utils/clash.ts @@ -35,6 +35,12 @@ export const getClashNodes = function ( if (nodeConfig.underlyingProxy) { clashNode['dialer-proxy'] = nodeConfig.underlyingProxy } + if (nodeConfig.ipVersion) { + clashNode['ip-version'] = nodeConfig.ipVersion + } + if (nodeConfig.interfaceName) { + clashNode['interface-name'] = nodeConfig.interfaceName + } if ('multiplex' in nodeConfig && nodeConfig.multiplex) { // https://wiki.metacubex.one/config/proxies/sing-mux/#sing-mux diff --git a/src/validators/common.ts b/src/validators/common.ts index a42ce0b4..c1c06e1d 100644 --- a/src/validators/common.ts +++ b/src/validators/common.ts @@ -100,6 +100,8 @@ export const SimpleNodeConfigValidator = z.object({ hostnameIp: z.array(z.string()).readonly().optional(), binPath: z.string().optional(), localPort: z.number().optional(), + interfaceName: z.string().optional(), + ipVersion: z.string().optional(), }) export const TlsNodeConfigValidator = SimpleNodeConfigValidator.extend({