mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
parent
9cd1aef1db
commit
bef9eea87b
|
@ -28,10 +28,10 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
let validReg;
|
let validReg;
|
||||||
if (getSystem() === "windows") {
|
if (getSystem() === "windows") {
|
||||||
validReg =
|
validReg =
|
||||||
/^((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|<local>)(;((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|<local>))*;?$/;
|
/^((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|<local>)(;((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\d{1,3}\.\*|\d{1,3}\.\*|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+|localhost|<local>))*;?$/;
|
||||||
} else {
|
} else {
|
||||||
validReg =
|
validReg =
|
||||||
/^((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|<local>)(,((\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|<local>))*,?$/;
|
/^((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|<local>)(,((\*\.)?([a-zA-Z0-9-]+\.?)+(local|test|example|invalid|localhost|onion|([a-zA-Z]{2,}))|(\d{1,3}\.){1,3}\d{1,3}(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\d{1,3}\.\*(\/\d{1,2}|\/3[0-2])?|\d{1,3}\.\*(\/3[0-2])?|([a-fA-F0-9:]+:+)+[a-fA-F0-9]+(\/\d{1,3})?|localhost|<local>))*,?$/;
|
||||||
}
|
}
|
||||||
|
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
14
src/services/types.d.ts
vendored
14
src/services/types.d.ts
vendored
|
@ -243,7 +243,7 @@ interface HttpOptions {
|
||||||
method?: string;
|
method?: string;
|
||||||
path?: string[];
|
path?: string[];
|
||||||
headers?: {
|
headers?: {
|
||||||
[key: string]: string;
|
[key: string]: string[];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +325,9 @@ interface IProxyHttpConfig extends IProxyBaseConfig {
|
||||||
sni?: string;
|
sni?: string;
|
||||||
"skip-cert-verify"?: boolean;
|
"skip-cert-verify"?: boolean;
|
||||||
fingerprint?: string;
|
fingerprint?: string;
|
||||||
headers?: {};
|
headers?: {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// socks5
|
// socks5
|
||||||
interface IProxySocks5Config extends IProxyBaseConfig {
|
interface IProxySocks5Config extends IProxyBaseConfig {
|
||||||
|
@ -430,7 +432,9 @@ interface IProxyVlessConfig extends IProxyBaseConfig {
|
||||||
"grpc-opts"?: GrpcOptions;
|
"grpc-opts"?: GrpcOptions;
|
||||||
"ws-opts"?: WsOptions;
|
"ws-opts"?: WsOptions;
|
||||||
"ws-path"?: string;
|
"ws-path"?: string;
|
||||||
"ws-headers"?: {};
|
"ws-headers"?: {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
"skip-cert-verify"?: boolean;
|
"skip-cert-verify"?: boolean;
|
||||||
fingerprint?: string;
|
fingerprint?: string;
|
||||||
servername?: string;
|
servername?: string;
|
||||||
|
@ -557,7 +561,9 @@ interface IProxyShadowsocksConfig extends IProxyBaseConfig {
|
||||||
path?: string;
|
path?: string;
|
||||||
tls?: string;
|
tls?: string;
|
||||||
fingerprint?: string;
|
fingerprint?: string;
|
||||||
headers?: {};
|
headers?: {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
"skip-cert-verify"?: boolean;
|
"skip-cert-verify"?: boolean;
|
||||||
version?: number;
|
version?: number;
|
||||||
mux?: boolean;
|
mux?: boolean;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user