Open m-mattia-m opened 4 months ago
Do I need an active internet connection for a local proxy that is in charge of the mapping?
It should work if it's a Map Local tool because it's a MOCK Response. It doesn't make a real connection to the server, so the Internet Connection is not needed.
Now I downloaded these two file and mapped the request to this files.
Can you show me how your Map Local setting is?
Thank you for your quick response. :)
I have this two rules:
# Stoplight - JS
GET
https://unpkg.com/@stoplight/elements@8.1.0/web-components.min.js
Use Wildcard
Include all subpaths of this URL
<import-file: web-components-min-js.txt>
# Stoplight - CSS
GET
https://unpkg.com/@stoplight/elements@8.1.0/styles.min.css
Use Wildcard
Include all subpaths of this URL
<import-file: styles-min-css.txt>
I guess when you import the file <import-file: web-components-min-js.txt>
, it removes all Status Code and Response Header, right?
So, maybe your client will reject this request because there is no Content-Type header.
I suggest.
https://unpkg.com/@stoplight/elements@8.1.0/web-components.min.js
by Google Chrome -> If it's Cached -> Go to Tool -> No Caching Tool -> Resent the request againI tested by using cURL and it works fine 👍
Yes you're right there isn't any HTTP Status Code it's only (failed) net::ERR_INTERNET_DISCONNECTED
.
I deleted my local mapping rules and recreated them as you've described. However if I disable my Wi-Fi I'm still getting this error: (failed) net::ERR_INTERNET_DISCONNECTED
.
Proxyman (v5.6.1) is active. Proxy Helper Tools (v1.6.0) is installed and active. There aren't any other active VPNs or Proxies.
@m-mattia-m can you use cURL to test it?
curl https://unpkg.com/@stoplight/elements@8.1.0/web-components.min.js --proxy localhost:9090
-> Verify we can see the Response from Map Local (There is a tick on the Edited Column on the main table -> It means the Map Local is applied)curl
again -> Verify we can see the responseIf it's good, but your Google Chrome doesn't work, I guess the Google Chrome has a feature to check the Internet connection before making any requests. If there is no internet, it's failed immediately without calling to Proxyman.
@NghiaTranUIT
I tested it now with cURL, which works even without an internet connection (it has the tick in the "Edited" column, and I got my response). However, as soon as I tried it in Google Chrome (Arc), it didn't work. When I use my browser, I always get the above error. I also tested it with http://proxyman.local:8081
but it had the same result.
Do you know any solution for this problem that it doesn't work in Chrome (I also tested it with Firefox and Safari, and it doesn't work either)?
I see: If the Wi-Fi is OFF, Google Chrome or Safari won't use the Proxy anymore because the Proxy Setting is applied to the Wi-Fi. As a result, no internet connection on Google Chrome, but works with cURL.
To workaround it, you should use Firefox:
127.0.0.1
at port 9090https://github.com/user-attachments/assets/25e700b6-8daa-4ccf-856c-eff4b0856ccf
By using Manual Proxy in Firefox, it will work regardless of the Wi-Fi connection.
It works fine in Firefox. I think it's a missing feature of Chrome, but if there's a way that Proxyman could solve the missing proxy problem in Chrome it would be great.
Sorry, Proxyman can't fix this problem from Google Chrome because Google Chrome doesn't offer a way to set a manual proxy. It use the system proxy by default.
Only Firefox or Firefox-based web browsers like Brave have this feature.
For everyone who is coming across this thread, I've found a Chrome extension for this problem. If you search for "Proxy" in the Chrome extension store, you are going to find many options that are working. One of these is Proxy SwitchyOmega .
After you have added this extension to your browser, you can open "options" and configure Proxyman as your proxy (localhost:9090
). (Don't forget to click the "Apply changes" button on the left side.) After that, you can switch between the profiles (system or proxy).
Thanks, this Google Proxy extension will work. Let me know if you have any problems 👍
Description
I'm using a external JS and CSS file for my frontend which I can't change. Now I downloaded these two file and mapped the request to this files. The files are correct but if I work offline the local file mapping doesn't work. Do I need an active internet connection for a local proxy that is in charge of the mapping?