metacubexd/src/types.d.ts

166 lines
2.8 KiB
TypeScript
Raw Normal View History

2023-08-24 04:20:53 +08:00
declare module 'solid-js' {
namespace JSX {
interface Directives {
[name: string]: {}
2023-08-24 04:20:53 +08:00
}
}
}
export type Proxy = {
name: string
type: string
all?: string[]
extra: Record<string, unknown>
history: {
time: string
delay: number
}[]
udp: boolean
xudp: boolean
tfo: boolean
now: string
}
2023-08-30 23:54:49 +08:00
export type ProxyNode = {
alive: boolean
type: string
2023-08-24 04:20:53 +08:00
name: string
2023-08-30 23:54:49 +08:00
tfo: boolean
udp: boolean
xudp: boolean
id: string
extra: Record<string, unknown>
history: {
time: string
delay: number
2023-08-24 04:20:53 +08:00
}[]
2023-08-30 23:54:49 +08:00
}
2023-09-01 12:40:34 +08:00
export type SubscriptionInfo = {
Download: number
Upload: number
Total: number
Expire: number
}
2023-08-30 23:54:49 +08:00
export type ProxyProvider = {
2023-09-01 12:40:34 +08:00
subscriptionInfo: SubscriptionInfo
2023-08-30 23:54:49 +08:00
name: string
proxies: ProxyNode[]
2023-08-24 04:20:53 +08:00
testUrl: string
updatedAt: string
vehicleType: string
}
2023-08-28 22:13:48 +08:00
export type Rule = {
type: string
payload: string
proxy: string
size: number
}
2023-08-24 04:20:53 +08:00
export type RuleProvider = {
behavior: string
format: string
name: string
ruleCount: number
type: string
updatedAt: string
vehicleType: string
}
export type Connection = {
id: string
download: number
upload: number
chains: string[]
rule: string
rulePayload: string
start: string
metadata: {
network: string
type: string
destinationIP: string
destinationPort: string
dnsMode: string
host: string
inboundIP: string
inboundName: string
inboundPort: string
inboundUser: string
process: string
processPath: string
remoteDestination: string
sniffHost: string
sourceIP: string
sourcePort: string
specialProxy: string
specialRules: string
uid: number
}
}
2023-09-01 22:07:02 +08:00
export type Log = {
type: string
payload: string
}
2023-08-24 04:20:53 +08:00
export type Config = {
port: number
'socks-port': number
'redir-port': number
'tproxy-port': number
'mixed-port': number
tun: {
enable: boolean
device: string
stack: string
'dns-hijack': null
'auto-route': boolean
'auto-detect-interface': boolean
'file-descriptor': number
}
'tuic-server': {
enable: boolean
listen: string
certificate: string
'private-key': string
}
'ss-config': string
'vmess-config': string
authentication: null
'allow-lan': boolean
'bind-address': string
'inbound-tfo': boolean
mode: 'rule' | 'global'
UnifiedDelay: boolean
'log-level': string
ipv6: boolean
'interface-name': string
'geodata-mode': boolean
'geodata-loader': string
'tcp-concurrent': boolean
'find-process-mode': string
sniffing: boolean
'global-client-fingerprint': boolean
}
2023-09-01 14:06:21 +08:00
export type DNSQuery = {
AD: boolean
CD: boolean
RA: boolean
RD: boolean
TC: boolean
status: number
Question: {
Name: string
Qtype: number
Qclass: number
}[]
Answer?: {
2023-09-01 14:06:21 +08:00
TTL: number
data: string
name: string
type: number
}[]
}