How to Proxy for Browser Communications Only in Bash Scripts

Asked 2 years ago, Updated 2 years ago, 452 views

I would like to use the proxy specified only when the chrome browser communicates through the Bash script, is that possible?
I have a vague knowledge of the network, so could you tell me what kind of articles I should refer to?

I want to communicate by changing the proxy of browser communication.If I throw a request with chrome, I would like to change the proxy by using the Bash script, and then I would like to throw a request again to change the proxy.
I don't want to use the proxy specified for all communication on my computer, so I'd like to focus on browser communication.

I know that the proxy connects to the Internet through the proxy server (the IP address changes).The image is
Image used to hide one's IP address.I don't know if that's why it's used, but relaying the proxy server
This may improve security in some cases.

If you set up a proxy at the terminal, I feel that all communication goes through that proxy.I want to use proxy only for browser communication.

Enter a description of the image here

When I was looking at the Mac network settings, I found a protocol to configure, and I think that if I check only HTTP and HTTPS with this, only browser communication can be done via proxy.
However, I think most apps use HTTP and HTTPS communication.I feel like the Mac apps Notion, Spotify, etc. are communicating with those protocols.I don't know where the other protocols are used.
FTP has been used before to upload data to the server.I don't really understand the difference from HTTP, both of which communicate with the server.
Is it just a difference between languages?
It's often in parables.I can't talk to Japanese and English speakers.

bash network google-chrome

2022-09-30 21:54

1 Answers

It's not bash, but how about using the proxy autoconfiguration file, so-called proxy.pac? The proxy.pac is the JavaScript code that the browser evaluates on each request to determine which proxy to use.I think you can change the proxy you want to use.

Google Chrome appears to be able to be specified with the boot option --proxy-pac-url.


2022-09-30 21:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.