Sample Header Ad - 728x90

Ask Different (Apple)

Q&A for power users of Apple hardware and software

Latest Questions

2 votes
0 answers
102 views
Why is macOS sending plain HTTP requests to my secure web proxy?
I have developed a web proxy server. It's running on a Raspberry Pi in my house, and it seems to be working as intended using Linux devices I have around and using cURL on my Mac. However, in practice, when I configure my Mac in System Settings to use the proxy server, things don't go as expected. I...
I have developed a web proxy server. It's running on a Raspberry Pi in my house, and it seems to be working as intended using Linux devices I have around and using cURL on my Mac. However, in practice, when I configure my Mac in System Settings to use the proxy server, things don't go as expected. I found that my Mac will always send plain HTTP requests to the server despite having configured a "secure web proxy (HTTPS)" as opposed to a "web proxy (HTTP)" (and the Proxy-Authorization header is missing despite having configured a username and password). I tried handling this in the proxy server, by detecting if it received HTTP data instead of TLS data and responding with a “426 Upgrade Required” and the relevant headers, but this seems to be ignored. The TLS certificate was generated using [mkcert](https://github.com/FiloSottile/mkcert) , and the CA is correctly installed on my Mac. The proxy server is served on port 443. My Mac is on macOS 15.5 (24F74). I also tested on my iPhone, iOS 18.5 (22F76), which seems to completely ignore the proxy altogether. As far as I can tell, no requests from my iPhone go through the proxy at all.
valentinegb (61 rep)
May 13, 2025, 10:11 PM • Last activity: May 14, 2025, 05:47 PM
5 votes
1 answers
947 views
How to prevent Safari 18 from forcing HSTS policy for subdomains for development purposes?
I have a variety of sites under development staged using subdomains of a single domain (e.g., `this.example.com`, `that.example.com`, etc.). Some implement SSL; some don't. This is fine – they're all works in progress not accessible outside my LAN. The problem is that Safari remembers its HSTS polic...
I have a variety of sites under development staged using subdomains of a single domain (e.g., this.example.com, that.example.com, etc.). Some implement SSL; some don't. This is fine – they're all works in progress not accessible outside my LAN. The problem is that Safari remembers its HSTS policy for an entire domain, not per subdomain. Once it loads https://this.example.com , it refuses not only to load http://thissub.example.com , but also http://that.example.com . Removing the local data for the parent domain under “Safari > Settings > Privacy > Manage Website Data” works until various changes between http and https are remembered, at which point it once against rejects all http connections. The constant nannying means it's not feasible to analyze the developing sites using Safari, which is particularly annoying since that's the target browser for all of them. Older suggestions (e.g., delete ~/Library/Cookies/HSTS.plist) aren't applicable to Safari 18. Is there some way to force it to stop mothering me?
A Bowler Cat (1013 rep)
Dec 31, 2024, 04:08 AM • Last activity: Dec 31, 2024, 02:23 PM
-2 votes
3 answers
5270 views
Searching Internet from Terminal
Is it possible to search the internet from the terminal? For instance, could I write some command followed by say https://github.com and it will automatically open a browser with that site through the http protocol?
Is it possible to search the internet from the terminal? For instance, could I write some command followed by say https://github.com and it will automatically open a browser with that site through the http protocol?
Cody Rutscher (193 rep)
Aug 19, 2018, 01:41 PM • Last activity: Aug 21, 2024, 02:58 PM
27 votes
7 answers
93774 views
Safari can't connect to https
Safari suddenly can't connect to any HTTPS site because it "can't establish a secure connection". This is on an administrator account, not a managed account. A different administrator account is able to use Safari with HTTPS, so must be something specific to my account, but I have no idea what. Goog...
Safari suddenly can't connect to any HTTPS site because it "can't establish a secure connection". This is on an administrator account, not a managed account. A different administrator account is able to use Safari with HTTPS, so must be something specific to my account, but I have no idea what. Google Chrome has no problems connecting to HTTPS sites. Things I have tried: * emptied Safari's cache * deleted Safari's preferences * reset Safari entirely * repaired Keychain (no errors found) * deleted Keychain (didn't help) * repaired permissions in Disk Utility * rebooted * hoped it would suddenly fix itself All of the google results I saw suggested either repairing the Keychain (which I tried and which did not help) or were only applicable if there were "Parental Controls" involved, which doesn't apply here. If I had to guess, I would think that wherever Safari is checking for "certificates" is somehow corrupted, but I could be wrong. I'm not even sure where to look for those - maybe ~/Library/?
TJ Luoma (21052 rep)
Jun 12, 2012, 11:18 PM • Last activity: Aug 15, 2024, 04:47 PM
18 votes
7 answers
25681 views
Are there less expensive (or free) alternatives to Charles proxy?
Does anybody know a free alternative to [Charles (an HTTP debugging proxy][1]), preferably with a GUI and similar features? Features that I'm interested in: * Inspect HTTP requests/responses (header, body, etc) * JSON syntax highlighting and formatting * Request filter (by host, URL, etc) * Search *...
Does anybody know a free alternative to Charles (an HTTP debugging proxy ), preferably with a GUI and similar features? Features that I'm interested in: * Inspect HTTP requests/responses (header, body, etc) * JSON syntax highlighting and formatting * Request filter (by host, URL, etc) * Search * Would be awesome if it could render HTML (Charles can't do it) I’m willing to sacrifice features in exchange for not paying the $50 license fee currently required to license the first seat of Charles proxy suite of tools.
iosdude (351 rep)
Sep 12, 2016, 05:41 AM • Last activity: Jun 17, 2024, 01:45 PM
1 votes
2 answers
121 views
Is there a way to restart a launchd service if it stops responding on a port?
I have a service configured via `launchd` to automatically restart when it crashes. Unfortunately it will sometimes hang, and stop working, without actually crashing. I can detect when this has happens because it stops responding to HTTP on a specific port. What's the best way to automatically resta...
I have a service configured via launchd to automatically restart when it crashes. Unfortunately it will sometimes hang, and stop working, without actually crashing. I can detect when this has happens because it stops responding to HTTP on a specific port. What's the best way to automatically restart the service when this happens? I've thought about creating a separate launchd agent whose only purpose is to periodically poll the HTTP port and kill the service when it stops responding. But I feel like there must be a better way to do it, perhaps built into launchd?
DNS (152 rep)
Dec 24, 2023, 07:32 PM • Last activity: Dec 25, 2023, 01:18 PM
1 votes
1 answers
1528 views
Safari says IP address isn't valid but other browsers can access it
I have a Raspberry Pi set up with WordPress using a reserved IP address `192.168.x.yyy` and I don't have SSL set up yet, so only HTTP not HTTPS. When I try to go to that address (`http://192.168.x.yyy`) on Safari I get the error: Safari can't open the page `www.192.168.x.yyy` because the page's addr...
I have a Raspberry Pi set up with WordPress using a reserved IP address 192.168.x.yyy and I don't have SSL set up yet, so only HTTP not HTTPS. When I try to go to that address (http://192.168.x.yyy ) on Safari I get the error: Safari can't open the page www.192.168.x.yyy because the page's address isn't valid. I'm able to load the page using MS Edge, Opera, Firefox, and Chrome. I get the note that the site isn't secure, but it loads on all these browsers. Any suggestions on how to get Safari to access my site?
for coder in woods (11 rep)
Nov 14, 2023, 02:46 PM • Last activity: Nov 15, 2023, 01:33 AM
1 votes
0 answers
280 views
Intermittent "Operation not permitted", "Unable to start the server" error while running 'safaridriver'
I'm encountering an intermittent issue, while trying to run `safaridriver` on OSX Sonoma. Here are the details of the problem: I ran `sudo /usr/bin/safaridriver -p0 --enable` in the beginning. After that when I run this multiple times `/usr/bin/safaridriver -p0`, I was facing an issue where I receiv...
I'm encountering an intermittent issue, while trying to run safaridriver on OSX Sonoma. Here are the details of the problem: I ran sudo /usr/bin/safaridriver -p0 --enable in the beginning. After that when I run this multiple times /usr/bin/safaridriver -p0, I was facing an issue where I receive an "Operation not permitted" error, but not consistently. This issue seems to occur intermittently. I've checked the sudo logs, and I see the following error message:
kernel: (Sandbox) Sandbox: com.apple.WebDriver.HTTPService(2049) deny(1) user-preference-write com.apple.WebDriver.HTTPService    
    cfprefsd: (CoreFoundation) [com.apple.defaults:cfprefsd] rejecting write of key(s) MobileDeviceRemoteXPCEnabled in { com.apple.WebDriver.HTTPService, nimish, kCFPreferencesAnyHost,  
    /Users/nimish/Library/Preferences/com.apple.WebDriver.HTTPService.plist, managed: 0 } from process 2049 (com.apple.WebDriver.HTTPService) because setting these preferences requires user-preference-write or file-write-data sandbox access 
    cfprefsd: (CoreFoundation) [com.apple.defaults:cfprefsd] Couldn't open parent path due to [2: No such file or directory 
    kernel: (Sandbox) Sandbox: com.apple.WebDriver.HTTPService(2049) deny(1) network-bind local:*:7055 
    com.apple.WebDriver.HTTPService: (WebDriver) [com.apple.WebDriver:WebService] Error starting HTTP server listening on localhost:0: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedDescription=Operation not permitted, NSLocalizedFailureReason=Error in bind() function} 
    com.apple.WebDriver.HTTPService: (WebDriver) [com.apple.WebDriver:XPCService] Client connection invalidated for some reason
I am getting this on macOS Sonoma.
Nimish Bansal (21 rep)
Oct 23, 2023, 01:31 PM
2 votes
0 answers
255 views
Secure web proxy (HTTPs) settings sending plain http request
I have my Secure web proxy (HTTPs) setting as following. Server: my.proxy.net Port: 5000 It looks like my proxy server gets a request, but gives error like this. http: TLS handshake error from my.ip.address:port: tls: first record does not look like a TLS handshake I have no problem accessing the pr...
I have my Secure web proxy (HTTPs) setting as following. Server: my.proxy.net Port: 5000 It looks like my proxy server gets a request, but gives error like this. http: TLS handshake error from my.ip.address:port: tls: first record does not look like a TLS handshake I have no problem accessing the proxy server from Windows, so I'm not sure if it is client's (macos) problem or server's (proxy server) problem.
FlashAgain (21 rep)
Sep 6, 2023, 10:54 AM
0 votes
1 answers
1476 views
Where does Safari persist the credentials of HTTP(S) Basic Authentication?
- Some websites use [HTTP basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). - How can you save the credentials of this kind of login in macOS Safari? - Where does Safari persist the credentials?
- Some websites use [HTTP basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication) . - How can you save the credentials of this kind of login in macOS Safari? - Where does Safari persist the credentials?
porg (1118 rep)
May 16, 2023, 02:26 PM • Last activity: May 16, 2023, 02:33 PM
61 votes
6 answers
72489 views
Safari Redirecting http to (non-existent) https
Safari forces a redirect to the https version of a site I previously visited via https. However, the https site no longer works and there is no way to prevent Safari form trying to load it. [![HTTP redirects to HTTPS][1]][1] Here is a related Apple Forums question, [Safari keeps redirecting http to...
Safari forces a redirect to the https version of a site I previously visited via https. However, the https site no longer works and there is no way to prevent Safari form trying to load it. HTTP redirects to HTTPS Here is a related Apple Forums question, Safari keeps redirecting http to https
Richard Stelling (1239 rep)
Nov 10, 2015, 03:30 PM • Last activity: May 11, 2023, 09:31 PM
17 votes
2 answers
7395 views
How to change Safari HTTP header Accept-Language?
In Firefox Accept-Language is set globally for the browser in the general preferences or via an extension like "Modify Headers" for more frequent changes. But how to do that in Safari? > [Safari. On OS X][1] the language sent is that specified in the OS X system language preferences. To change those...
In Firefox Accept-Language is set globally for the browser in the general preferences or via an extension like "Modify Headers" for more frequent changes. But how to do that in Safari? > Safari. On OS X the language sent is that specified in the OS X system language preferences. To change those preferences go to System Preferences > Language & Region > Preferred Language, but be aware that it will change the language of your user interface, not just your browser language preferences. Make sure you know how to switch back to your normal language! That is very inconvenient. Is there a way to do the same with Safari, to simulate a different language/location, for example for web development purposes?
Gustavo (695 rep)
Mar 3, 2017, 06:43 PM • Last activity: Jan 18, 2022, 09:44 AM
4 votes
1 answers
2987 views
How to stop Safari on macOS from using https when I want http, when it's not in the HSTS listing
When I try to visit certain sites and force http (for good reasons that do not need to be discussed here), Safari (macOS) forces the URL to use https - and since the site currently has no https support, I can't visit the site. There are many answers that suggest that this is related to [HSTS][1] but...
When I try to visit certain sites and force http (for good reasons that do not need to be discussed here), Safari (macOS) forces the URL to use https - and since the site currently has no https support, I can't visit the site. There are many answers that suggest that this is related to HSTS but this does not apply in my case: The site in question is not listed in Safari's Privacy under WebSite Data nor does it appear in the HSTS.plist file. So, there is some other cause that forces Safari to use https, and I suspect it's from the fact that Safari has previously seen me visiting the site with https and now assumes I always want to do that. Note that when I load the URL with wget, then I get the http version just fine. That should prove that it's Safari's behavior, not the web site's. So, beside the HSTS settings what other settings might there be that force https in Safari on macOS?
Thomas Tempelmann (1972 rep)
Sep 8, 2020, 04:52 PM • Last activity: Dec 7, 2021, 05:02 PM
25 votes
6 answers
124446 views
How do you watch HTTP requests an iPhone app is making?
Just the same way you can open the web inspector or activity window in Safari on your laptop and see all the HTTP requests any website has made, how do you do that on the iphone for an iPhone app, if the iPhone app is using HTML5 (or even if it's a native app)?
Just the same way you can open the web inspector or activity window in Safari on your laptop and see all the HTTP requests any website has made, how do you do that on the iphone for an iPhone app, if the iPhone app is using HTML5 (or even if it's a native app)?
Lance Pollard (477 rep)
Jul 21, 2011, 05:55 PM • Last activity: Sep 24, 2021, 10:52 AM
1 votes
1 answers
465 views
macOS Safari can not delete stored http digest password
I enter a site with HTTP authentication, and use my credentials, username and password, and selected "**remember password**" option. After that, site is always accessible without login, which is ok. But then if I want for some reason (security, testing, switching user etc) to delete that password, t...
I enter a site with HTTP authentication, and use my credentials, username and password, and selected "**remember password**" option. After that, site is always accessible without login, which is ok. But then if I want for some reason (security, testing, switching user etc) to delete that password, to make Safari forgot it and show me the login window again - I can not find an option for deletion. I have tried: - Safari -> Preferences -> Passwords - Safari -> Preferences -> Privacy -> Manage Website Data - Keychain Access -> Passwords But none of them contains website name. Also tested "**deleting all history and cookies**", and "force-kill Safari app" but password is still remembered somewhere. By HTTP authentication I mean classic http protocol basic and digest authentication (used on some sites and often in routers and cameras) What other preferences, settings for Safari and macOS i should try? **update:** it seems that it was my own, newbie, fault (looking at 'local items' instead of 'login' portion of keychain passwords). so HTTP credentials entered: - without 'remember password' option are well cleared by '**force kill Safari app**' - with 'remember password' option, data can be found and deleted inside '**Keychain Access -> Login -> Passwords**' list. accepting below answer for good private-browsing tip (not sure if whole question is better to be deleted instead)
Asain Kujovic (113 rep)
Sep 5, 2021, 11:22 PM • Last activity: Sep 7, 2021, 04:05 AM
0 votes
1 answers
1240 views
Safari redirecting to http instead of https
When using Safari 14.0.3 on Mojave, if I paste https://gramhum.com in the address bar, I am redirected to greatfon.com, but the "https://" part disappears and the query is sent unencrypted via port 80. It is blocked by the firewall, so it fails. I have to manually retype the URL to make it work. Sam...
When using Safari 14.0.3 on Mojave, if I paste https://gramhum.com in the address bar, I am redirected to greatfon.com, but the "https://" part disappears and the query is sent unencrypted via port 80. It is blocked by the firewall, so it fails. I have to manually retype the URL to make it work. Same thing happens if I click the link inside an HTML file. The option "Show full website address" is enabled, and if I replace https://gramhum.com with https://greatfon.com , it works. I have no problem with Firefox and Chrome (these browsers redirect properly to http**s**://greatfon.com).
Dale Cooper (21 rep)
Apr 18, 2021, 08:27 PM • Last activity: Apr 19, 2021, 08:21 AM
1 votes
0 answers
619 views
Cannot access a web server of macos from my android smartphone on same network
On macos, I did the following. ``` $ mkdir foo $ cd foo $ vi index.html $ cat index.html > > > > > > > test > > > EOF python3 -m http.server 3333 ``` Then I tried to access 192.168.1.xx:3333 from my android device, but it failed(the error message is "Cannot access the site"). Why? On macos web brows...
On macos, I did the following.
$ mkdir foo
$ cd foo
$ vi index.html
$ cat  index.html
> 
> 
>   
>     
>   
>   
>    test 
>   
> 
> EOF
python3 -m http.server 3333
Then I tried to access 192.168.1.xx:3333 from my android device, but it failed(the error message is "Cannot access the site"). Why? On macos web browser(Chrome), I was able to see the index.html page. By the way, on System Preferences > Sharing, I checked Remote Login, and I turned off Firewall.
gogogogogo (11 rep)
Sep 10, 2020, 12:35 PM
0 votes
1 answers
123 views
Why I can still access Internet after I set the the HTTP proxy to a unknow address?
Why I set the HTTP proxy to a nono-proxy IP address, I can still access the Internet? I follow this [tutorial](https://www.youtube.com/watch?v=HpdD8W3Pjus), at the time `2:08`, you see there should be can not access the Internet. but I set to a non-proxy address `9.9.9.9:12345`. but I can still acce...
Why I set the HTTP proxy to a nono-proxy IP address, I can still access the Internet? I follow this [tutorial](https://www.youtube.com/watch?v=HpdD8W3Pjus) , at the time 2:08, you see there should be can not access the Internet. but I set to a non-proxy address 9.9.9.9:12345. but I can still access the Internet, why?
244boy (591 rep)
Sep 7, 2020, 03:21 AM • Last activity: Sep 7, 2020, 08:12 AM
8 votes
6 answers
13218 views
Is there a native/cocoa REST client for Mac OS X?
I'm looking for a cocoa [REST client][1] for the OS X. I prefer something native so that I'm not in the terminal interface and not looking for any browser extensions. [1]: http://en.wikipedia.org/wiki/Representational_state_transfer
I'm looking for a cocoa REST client for the OS X. I prefer something native so that I'm not in the terminal interface and not looking for any browser extensions.
Wojciech Bednarski (325 rep)
Feb 17, 2012, 04:53 PM • Last activity: Aug 5, 2020, 09:11 PM
2 votes
0 answers
92 views
Non-HTTPS websites don't work over Anker ethernet adapter since Catalina
I'm having a weird bug where my [Anker USB-C hub][1] is messing with the ethernet connection. I can only visit HTTPS sites and HTTP sites get redirected to a page saying: Router Behind Router Detected warningError: The Connection Monitor has detected a third party router connected to the 5268AC I be...
I'm having a weird bug where my Anker USB-C hub is messing with the ethernet connection. I can only visit HTTPS sites and HTTP sites get redirected to a page saying: Router Behind Router Detected warningError: The Connection Monitor has detected a third party router connected to the 5268AC I believe this has only started happening since I last updated (currently on 10.15.4). Here are a few things I've tried: - Testing with another MacBook gave the same results - Testing on a different network just didn't resolve HTTP sites (no redirect) - Testing with a different branded adapter on the same network is fine Is there some reason this adapter doesn't work anymore? Is it fixable? Thanks!
Leo Adberg (176 rep)
Apr 17, 2020, 06:42 AM
Showing page 1 of 20 total questions