arn-browser 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -124,6 +124,17 @@ export interface ProxyServerController {
|
|
|
124
124
|
|
|
125
125
|
/** Returns formatted statistics for hostnames per proxy channel */
|
|
126
126
|
getHostStats: () => Record<string, Record<string, TrafficStats>>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Dynamically update host routing at runtime.
|
|
130
|
+
* Only provided arrays are rebuilt — omitted ones stay unchanged.
|
|
131
|
+
* Affects all NEW connections; existing connections are untouched.
|
|
132
|
+
*/
|
|
133
|
+
updateHosts: (options?: {
|
|
134
|
+
PROXY_1_HOSTS?: string[];
|
|
135
|
+
PROXY_2_HOSTS?: string[];
|
|
136
|
+
NO_PROXY_HOSTS?: string[];
|
|
137
|
+
}) => void;
|
|
127
138
|
}
|
|
128
139
|
|
|
129
140
|
/**
|
|
@@ -464,5 +464,16 @@ export async function startProxyServer({
|
|
|
464
464
|
|
|
465
465
|
getProxyStats: getProxyStatsFormatted,
|
|
466
466
|
getHostStats: getHostStatsFormatted,
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Dynamically update host routing at runtime.
|
|
470
|
+
* Only provided arrays are rebuilt — omitted ones stay unchanged.
|
|
471
|
+
* Affects all NEW connections; existing connections are untouched.
|
|
472
|
+
*/
|
|
473
|
+
updateHosts: ({ PROXY_1_HOSTS, PROXY_2_HOSTS, NO_PROXY_HOSTS } = {}) => {
|
|
474
|
+
if (PROXY_1_HOSTS) matchers.proxy1 = createHostMatcher([...PROXY_1_HOSTS, "proxy.multilogin.com", "multilogin.com"]);
|
|
475
|
+
if (PROXY_2_HOSTS) matchers.proxy2 = createHostMatcher([...PROXY_2_HOSTS, "proxy.multilogin.com", "multilogin.com"]);
|
|
476
|
+
if (NO_PROXY_HOSTS) matchers.noProxy = createHostMatcher([...NO_PROXY_HOSTS, "%brave.com%", "%gvt1.com%"]);
|
|
477
|
+
},
|
|
467
478
|
};
|
|
468
479
|
}
|