Skip to content

A proxy server that use PAC file to decide how to forward request

Notifications You must be signed in to change notification settings

mrcat122/PacProxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PacProxy

A socks proxy server that use PAC file to decide how to forward request

Features

  • Implement a socks server(support socks4 and socks5, no authentication module)
  • Using PAC file to decide how to forward request

Install

  1. Install node.js
  2. Download PacProxy, and uncompress it
  3. If you need modify the default configuration, copy config.sample.js to config.js, and modify config.js to set the configuration, such as server bind address or port
  4. Run PacProxy.bat(windows only), or command line:
node ProxyServer.js
  1. Set the browser's proxy to 127.0.0.1:9999(socks5)

Notes

  1. IE/Chrome(without proxy extension) will send socks4 request to socks proxy server, * it is not recommended *, so please install a proxy extension to chrome, such as Foxy Proxy Standard
  2. If using firefox, please goto about:config and set 'network.proxy.socks_remote_dns' to 'true'

Issues

  • No authentication feature in PacProxy
  • Because FindProxyForURL need a url parameter, so we need cheating the socks client to guess the real http url for FindProxyForURL.
  • Because the built-in DNS module of nodejs provide only asynchronous call, so any DNS resolve related function(dnsResolve, isInNet, isResolvable) in PAC is faked. The program is maintaining a DNS cache table, DNS resolve function can only get result in the table. If your PAC don't call any DNS resolve related function, you can disable these functions in configuration file.

TODO

  • Provide configuration function [done]
  • Support http/https proxy forwarding [done]
  • Support binding as http/https proxy

About

A proxy server that use PAC file to decide how to forward request

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Batchfile 0.1%