Closed Bug 902346 Opened 11 years ago Closed 3 years ago

mozTCPSocket should respect the proxy preferences

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: freddy, Assigned: rnons)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently, mozTCPSocket does not respect the preferences that enable proxy support in Gecko (network.proxy.*). HTTP and SOCKS proxys are able to proxy non-HTTP connections, so this might be doable with little to none extra implementation effort
In what state is this bug?, I see at the moment this blocks many bugs and posibility to implement a feature to change the proxy prefs to GAIA in firefox OS(setting app I suppose). Now the only way is edit the file(prefs.js) in profile device or WebIDE > Device Preferences. But the way should be in Gaia, i think.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
  • Add a password field to MozProxyInfo
  • Add a proxyInfo field to SocketOptions
  • When constructing a TCPSocket, the MozProxyInfo is converted to nsIProxyInfo, then passed to CreateTransport
Assignee: nobody → remotenonsense
Status: NEW → ASSIGNED
Blocks: 1690977

The socket should work more like other uses of proxy, relying on the proxy service to fetch a proxyInfo. That should allow proxy.settings to work, or proxy.onRequest to receive the event and return the proxyInfo, which can include the password. If credentials are otherwise needed, it should ask for the credentials, which would also trigger webRequest.onAuthRequired. proxy.RequestDetails has a type (webRequest.ResourceType) where a "tcpSocket" type could be added, since this is not a "webSocket".

Given that approach, no API change (other than adding "tcpSocket" to the resource type) or even any webidl changes are necessary. TCPSocket would then also work with manually entered proxy configurations (via about:preferences).

https://searchfox.org/mozilla-central/rev/d537e47349944c0fbd0100bd52c30e493e748c2e/netwerk/protocol/http/nsHttpChannel.cpp#6402

Attachment #9201713 - Attachment description: Bug 902346 - Support proxy in TCPSocket. r=mjf → Bug 902346 - Support proxy in TCPSocket. r=mixedpuppy
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/integration/autoland/rev/373160bb04a5
Support proxy in TCPSocket. r=necko-reviewers
Flags: needinfo?(remotenonsense)
Attachment #9201713 - Attachment description: Bug 902346 - Support proxy in TCPSocket. r=mixedpuppy → Bug 902346 - Support socks proxy in TCPSocket. r=mixedpuppy
Blocks: 1693680
Pushed by remotenonsense@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b51cf4ac52f8
Support socks proxy in TCPSocket. r=mixedpuppy,necko-reviewers
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Regressions: 1736508
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: