designwithfocus

Networking & internet basics

How to Use a Proxy Server Without Breaking HTTPS

By Design With Focus Team 7 min read
Browser settings panel with a proxy host field and a lock icon beside it

Short answer

To use a proxy server, choose it in the browser and send secure traffic through a CONNECT tunnel so TLS still ends at the origin. RFC 9110 defines that proxy as a forwarding agent the client selects. Firefox can share one proxy with secure sites or keep a separate secure-proxy host. A successful CONNECT response switches the connection to blind forwarding. The proxy should not rewrite the protected request.

Last verified against the sources listed below.

Key takeaways

  • RFC 9110 defines a proxy as a forwarder the client chooses. A gateway, also called a reverse proxy, is a different role.
  • Firefox manual mode needs a host and port with no scheme. The policy example uses port 8080 only as an illustration.
  • Turn on Also use this proxy for HTTPS, or secure sites can skip the HTTP proxy you typed.
  • A 2xx response to CONNECT makes the proxy a blind tunnel. TLS then runs end to end.
  • Firefox never proxies localhost, 127.0.0.1/8, or ::1. Before Firefox 163, its policy page says port 443 is ignored.

How to use proxy server means choosing a forwarding agent in the browser, then keeping secure traffic inside a tunnel so the origin server still terminates TLS.

RFC 9110 defines a proxy as a message-forwarding agent that the client selects, usually with local configuration, to receive requests for some absolute URIs. A gateway, also called a reverse proxy, acts as the origin on the outbound side and forwards the request inward.

How the internet works is the path a request follows before any proxy setting changes the first hop.

Website security is why the secure path matters. A proxy the client chose can be a company filter. An interception proxy, which the RFC says the client did not choose, is a different risk.

What is an HTTP proxy?

It is a client-chosen forwarder for requests, separate from the origin server that holds the page.

RFC 9110 lists three intermediaries: proxy, gateway, and tunnel. A proxy translates requests through the HTTP interface.

Some translations are small, such as an ordinary http URI. Others cross into a different application protocol.

Organizations use proxies for security services, annotation, or a shared cache.

A tunnel is a blind relay. Once it is active, it is not a party to the HTTP messages. The RFC says tunnels extend a virtual connection through an intermediary, including when TLS runs through a shared firewall proxy. The tunnel ends when both sides close.

An interception proxy filters or redirects packets without the client choosing it. The RFC says that kind of intermediary is indistinguishable, at the protocol level, from an on-path attacker. Do not treat it as the same thing as the proxy you typed into the browser.

MDN’s proxy guide describes the forward proxy as acting for the client, and the reverse proxy as hiding servers. It also documents the Via header, which proxies add, and the Forwarded header for client details that would otherwise disappear.

How do you turn one on in Firefox?

Open Settings, choose General, then Configure proxy, and select Manual proxy configuration.

Firefox’s English strings place a group labeled Proxy settings in the General section. The button is Configure proxy. It opens a window titled Connection Settings, headed Configure Proxy Access to the Internet.

Mozilla’s proxy policy reference says those fields match the connection settings in Firefox preferences. Manual mode expects a host and a port with no scheme. The page’s example is proxy.example.com:8080. That port is an illustration, not a required number.

Set it with one action per step:

  1. Ask the proxy operator for the host name and the port.
  2. Open Firefox Settings.
  3. Select General.
  4. Select Configure proxy.
  5. Select Manual proxy configuration.
  6. Type the host in HTTP Proxy and the port in Port.
  7. Select Also use this proxy for HTTPS if secure sites should use that same proxy.
  8. Add extra exceptions under No proxy for, using forms such as .mozilla.org or 192.168.1.0/24.
  9. Close the dialog and load one secure page you already trust.

The dialog also offers No proxy, Use system proxy settings, a system Web Proxy Auto-Discovery option, Auto-detect proxy settings for this network, and Automatic proxy configuration URL. Connections to localhost, 127.0.0.1/8, and ::1 are never proxied. You do not need to type those three.

If an organization manages the browser, the policy page can lock the mode. The modes are none, system, manual, autoDetect, and autoConfig.

A locked policy ignores edits you make in the dialog. The page says to always include the port.

It also says that before Firefox 163, port 443 is ignored, so a proxy on that port needs a PAC file on those older versions.

Microsoft’s Edge proxy page says Edge uses system network settings by default, proxy included. To override one launch, the documented example is a proxy-server flag set to proxy2:8080. A single host and port there applies to all URLs. The value direct:// tells Edge not to use a proxy.

How does HTTPS survive the proxy?

The browser sends CONNECT, and after success the proxy only forwards bytes while TLS ends at the origin.

RFC 9110 says CONNECT asks the recipient to open a tunnel to the destination and then stick to blind forwarding until the tunnel closes. The request target is host and port, with a colon between them, and the client must send the port.

There is no default port. A 2xx response means tunnel mode starts right after the header section.

Any other response means the tunnel was not formed.

MDN says this is how a client behind an HTTP proxy reaches TLS sites. Not every proxy supports CONNECT, and some limit it to port 443. The RFC’s example for a secure destination is server.example.com:443, with Proxy-Authorization when the proxy demands credentials.

If you fill only HTTP Proxy and leave Also use this proxy for HTTPS unchecked, Mozilla’s policy page says secure requests bypass that HTTP proxy. The separate HTTPS Proxy field is the other route. The policy switch that matches the checkbox overrides the separate secure proxy and does not change the SOCKS proxy.

A proxy that terminates TLS itself is not this tunnel. The RFC treats interception the client did not choose as a different path. A certificate warning on a site you trust is a reason to stop, not a reason to click through.

CONNECT to an arbitrary port is risky. The RFC’s example is port 25, the reserved mail port, which could turn the proxy into a spam relay.

Supporting proxies should limit ports or safe targets. That limit belongs to the operator.

You use the host and port they gave you.

What should you check when it fails?

Match the failure to the host, the port, the secure-site checkbox, or a certificate the origin did not issue.

Symptom What the docs point at What to change
Secure sites ignore the proxy HTTP proxy set, sharing left off Select Also use this proxy for HTTPS, or fill HTTPS Proxy
Prompt for proxy credentials 407 Proxy Authentication Required Retry with Proxy-Authorization after the challenge
Localhost never uses the proxy Firefox skips localhost, 127.0.0.1/8, and ::1 Expected. Test with a public host
Proxy on port 443 is ignored Before Firefox 163, that port is ignored Use a PAC file on those older versions
FTP proxy field does nothing FTPProxy has no effect since Firefox 90 Leave that field empty
Edge ignores the system proxy A launch flag or a locked policy overrides it Read the proxy-server flag and Edge policy

A 407 is how a proxy challenges the client. The RFC says the proxy must send Proxy-Authenticate, and the client may retry with Proxy-Authorization.

Firefox can skip the prompt when a saved password works. The checkbox reads Do not prompt for authentication if password is saved.

If the password fails, Firefox still asks.

SOCKS is a separate box. The dialog offers SOCKS v4 and SOCKS v5, plus a switch to proxy DNS for each. The policy page says Firefox already looks up names through SOCKS v5 by default. Do not put an HTTP proxy host in the SOCKS field unless the operator said the service speaks SOCKS.

A PAC file is the automatic route. MDN says the file should use a .pac extension and the type application/x-ns-proxy-autoconfig, and that it defines FindProxyForURL. Firefox has a field labeled Automatic proxy configuration URL and a Reload button. Edge’s matching flag is proxy-pac-url, with the page’s example pointing at a proxy.pac address.

The tunnel still carries every image byte, so a smaller file shortens the transfer without changing the proxy.

An image compressor shrinks the file before it enters that path. The proxy, the CONNECT tunnel, and the TLS session stay as they were. Only the payload gets smaller. On a slow or metered link, the proxy is an extra hop and a large photo dominates the wait.

The working setup is a client-chosen proxy, an explicit path for secure sites, and a tunnel that does not rewrite the protected request. If the certificate changes, or the proxy starts answering as the origin, stop until you know who inserted that behavior.

Frequently asked questions

Does a secure site still end at the origin?

After a successful tunnel response, the proxy only forwards bytes in both directions. The origin still completes the encrypted session. If the browser warns that the certificate changed, something else is terminating that session. Stop and find out who installed the certificate before you continue. A client-chosen proxy that only tunnels should not present its own certificate for a site you already trust.

Why do secure sites skip the proxy?

The sharing checkbox is off, or the separate secure-proxy field is empty. Mozilla's policy page says that leaving the all-protocols switch off lets those requests bypass the proxy you typed for ordinary web traffic. Turn the checkbox on, or fill the secure proxy host and port the operator gave you. Then reload one site you already trust and confirm the page still shows the origin certificate.

What does status 407 mean?

It means the proxy is asking you to sign in. The specification says the proxy sends a challenge and the client may repeat the request with credentials. Firefox can stay quiet when a saved password works, and it prompts again if that password fails. This is the proxy in the middle, not the login form of the website. A wrong password here never reaches the origin as a normal page error.

Why does localhost ignore the proxy?

Firefox states that connections to localhost, 127.0.0.1/8, and ::1 are never proxied. The policy page describes the same default bypass, so you do not add those addresses yourself. A page on your own machine will not prove that the proxy works. Open a public site instead. If that public site fails, check the host and port before you change anything else.

Can Edge use a proxy other than the system one?

Yes. Edge uses the system network settings unless you override them. Microsoft documents a launch flag that sets one host and port for every URL, and another flag that names an automatic configuration script. A locked organization policy can ignore both the flag and the system setting. If the browser and the operating system disagree, open Edge's policy page and read the proxy entries there.

Sources