|
|
@ -23,12 +23,8 @@ class BaseProxy {
|
|
|
|
this.type = ''
|
|
|
|
this.type = ''
|
|
|
|
this.encryption = false
|
|
|
|
this.encryption = false
|
|
|
|
this.compression = false
|
|
|
|
this.compression = false
|
|
|
|
if (proxyStats.conf != null && proxyStats.conf.useEncryption != null) {
|
|
|
|
this.encryption = (proxyStats.conf?.transport?.useEncryption) || this.encryption;
|
|
|
|
this.encryption = proxyStats.conf.useEncryption
|
|
|
|
this.compression = (proxyStats.conf?.transport?.useCompression) || this.compression;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (proxyStats.conf != null && proxyStats.conf.useCompression != null) {
|
|
|
|
|
|
|
|
this.compression = proxyStats.conf.useCompression
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.conns = proxyStats.curConns
|
|
|
|
this.conns = proxyStats.curConns
|
|
|
|
this.trafficIn = proxyStats.todayTrafficIn
|
|
|
|
this.trafficIn = proxyStats.todayTrafficIn
|
|
|
|
this.trafficOut = proxyStats.todayTrafficOut
|
|
|
|
this.trafficOut = proxyStats.todayTrafficOut
|
|
|
@ -79,14 +75,12 @@ class HTTPProxy extends BaseProxy {
|
|
|
|
super(proxyStats)
|
|
|
|
super(proxyStats)
|
|
|
|
this.type = 'http'
|
|
|
|
this.type = 'http'
|
|
|
|
this.port = port
|
|
|
|
this.port = port
|
|
|
|
if (proxyStats.conf != null) {
|
|
|
|
if (proxyStats.conf) {
|
|
|
|
if (proxyStats.conf.customDomains != null) {
|
|
|
|
this.customDomains = proxyStats.conf.customDomains || this.customDomains;
|
|
|
|
this.customDomains = proxyStats.conf.customDomains
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.hostHeaderRewrite = proxyStats.conf.hostHeaderRewrite
|
|
|
|
this.hostHeaderRewrite = proxyStats.conf.hostHeaderRewrite
|
|
|
|
this.locations = proxyStats.conf.locations
|
|
|
|
this.locations = proxyStats.conf.locations
|
|
|
|
if (proxyStats.conf.subdomain != null && proxyStats.conf.subdomain != '') {
|
|
|
|
if (proxyStats.conf.subdomain) {
|
|
|
|
this.subdomain = proxyStats.conf.subdomain + '.' + subdomainHost
|
|
|
|
this.subdomain = `${proxyStats.conf.subdomain}.${subdomainHost}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -98,11 +92,9 @@ class HTTPSProxy extends BaseProxy {
|
|
|
|
this.type = 'https'
|
|
|
|
this.type = 'https'
|
|
|
|
this.port = port
|
|
|
|
this.port = port
|
|
|
|
if (proxyStats.conf != null) {
|
|
|
|
if (proxyStats.conf != null) {
|
|
|
|
if (proxyStats.conf.customDomains != null) {
|
|
|
|
this.customDomains = proxyStats.conf.customDomains || this.customDomains;
|
|
|
|
this.customDomains = proxyStats.conf.customDomains
|
|
|
|
if (proxyStats.conf.subdomain) {
|
|
|
|
}
|
|
|
|
this.subdomain = `${proxyStats.conf.subdomain}.${subdomainHost}`
|
|
|
|
if (proxyStats.conf.subdomain != null && proxyStats.conf.subdomain != '') {
|
|
|
|
|
|
|
|
this.subdomain = proxyStats.conf.subdomain + '.' + subdomainHost
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|