WebExtension proxy API: Resolve DNS entries on SOCKS5 proxy (not on the local system) -
does webextension proxy api in firefox support resolve dns on proxy server when using socks 5?
in nsiprotocolproxyservice api, no longer available in webextensions, possible. pass flag components.interfaces.nsiproxyinfo.transparent_proxy_resolves_host nsiprotocolproxyservice.newproxyinfo:
this flag set if proxy perform name resolution itself. if case, hostname used in fashion, , shouldn't form of dns lookup ourselves
is there equivalent option in new proxy api webextensions?
now has become possible webextension api use proxy dns. since bug 1381290 has landed in nightly, proxy script can return array of objects instead of string. in proposal, objects have following properties:
- |type| -- string, 1 of "http"|"https|"socks5"|"socks4"|"socks"|"direct"|"ignore"|. note "socks" synonym socks5. "ignore" means firefox should handle uri through global proxy settings (which wpad, pac, system, direct/none, or proxy server) or other installed addons.
- |host| -- string
- |port| -- integer between 1 , 65536 (tcp/ip not allow ports outside range)
- |username| -- optional string
- |password| -- optional string
- |proxydns| -- optional boolean. default false. if true, transparent_proxy_resolves_host set flag on nsiproxyinfo.flags proxy server used resolve dns queries.
- |failovertimeout| -- optional integer. default 1. number of seconds before timing out , trying next proxy in failover array
- |failover| -- optional array of objects these same properties. null terminate. default null (no failover, desired case 99% of time in experience).
for example:
{ type: "socks", host: "foo.com", port: 1080, proxydns: true, failovertimeout: 1, failover: { type: "socks", host: "bar.com", port: 1080, proxydns: true, failovertimeout: 0, failover: null } } but in actual patch can see no 'failover' option in array:
+ (let prop of ["type", "host", "port", "username", "password", "proxydns", "failovertimeout"]) { + this[prop](proxydata); + } and 'failover' server seems defined this:
+ let failoverproxy = proxydatalist.length > 0 ? this.createproxyinfofromdata(proxydatalist, defaultproxyinfo) : defaultproxyinfo; related info:
- bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=1381290)
- switchyomega (https://github.com/feliscatus/switchyomega/issues/1172)
Comments
Post a Comment