pac server not working
PupaRebbe opened this issue · comments
i ran the command to create a pac server, everything looks fine but it doesn't seem to work (maybe i didn't follow it right, in my case do i need to see a pac file at localhost:65010/dh.js ?)
Using parameters:
{
"local_host": "localhost",
"local_port": 65010,
"remote_host": "https://example.com/dh.js",
"remote_port": 443,
"usr": "user",
"pwd": "pass",
"as_pac_server": true
}
OK: listen at localhost:65010
You seems specified wrong parameter remote_host
, it should be the real proxy server address. For example: -remote_host example.com
If you specify as_pac_server true, you should know your original pac URL, for example: http://example.com/a/b/c.pac, then you can use http://localhost: 65010/a/b/c.pac after you run this tool.
good luck.
thanks for your reply.
if i need to specify the real proxy server address for -remote_host
, where do i specify my original PAC address ?
You do not need to specify your original PAC address, this tool does not care, it just maps
http://localhost: 65010/ANY_PATH/any.pac to
http://example.com/ANY_PATH/any.pac
maybe i wasn't clear enough.
lets say my PAC file lives on http://pacserver.com/any.pac
which doesn't require proxy authentication (transparent), but the PAC file sends all requests to a different proxy server which requires auth. how do i work with this ?
You mean nested authentication. Unfortunately the -as_pac_server true
does not resolve this case.
You should
- Modify the pac file, replace every address behind "PROXY ..." with
localhost:someport
- Create several proxy-login-automator with password and -local_port someport
- Present it with a local web server,
npm install -g http-server
http-server
It will serves current folder as a web as http://127.0.0.1:8080
Finally, your local proxy config should refer http://127.0.0.1:8080/modified.pac
good luck
thanks
so for which situation is the -as_pac_server true
made ? when the PAC server itself requires authentication ?
Oh, sorry every much, i was wrong, -as_pac_server true
is for both PAC server and child proxy server. This tool does solve the nest authentication problem, but the password must be same.
If the user/password are same for PAC server and child proxy server, then you do not need modify PAC file and create proxy server separately, you can just specify -as_pac_server true
Of course, for PAC or child proxy server which does not need password, the user/password injected by this tool is harmless, do not worry.