Total Pageviews

Thursday, 25 April 2013

终于成功配置3proxy,把socks proxy转化为http proxy

下载地址: http://3proxy.ru/current/3proxy-0.7-devel-120711025833.zip,解压,进入解压出来的目录3proxy-0.7-devel-120711025833\bin\,在里面建立一个3proxy.cfg文件,内容如下:
nscache 65536
timeouts 1 5 30 60 180 1800 15 60
users "linfeng:CL:iloveu"
auth iponly
allow *  
parent 1000 socks5+ 127.0.0.1 1080
proxy -n -a -p3128 (这里的proxy是http proxy)

 
复制c:\windows\system32\cmd.exe文件到 解压出来的目录3proxy-0.7-devel-120711025833\bin\。
然后运行 
3proxy-0.7-devel-120711025833\bin\里面的cmd.exe,输入3proxy.exe 3proxy.cfg,回车。
也可在 
3proxy-0.7-devel-120711025833\bin\里面建立一个start 3proxy.bat文件,内容为
 3proxy.exe 3proxy.cfg,然后双击该bat文件。
然后设置浏览器的http代理为127.0.0.1:3128,即可翻墙。
 
以上的 这行:socks -n -a -p3129 ,意思是3proxy在本机建立了一个socks proxy,这样设置你的浏览器
 的socks代理为127.0.0.1:3129,也是可翻墙的。
相关帖子: 
http://briteming.blogspot.co.uk/2013/04/pcprivoxypolipoopera-mobileopera-mobile.html
 
https://dream4ever.org/showthread.php?t=147191 
-------------------

3proxy -a tiny proxy server
   (c) 2002-2014 by Vladimir '3APA3A' Dubrovin <3proxy@3proxy.ru>

   please read License Agreement
*/

Please read doc/html/index.html and man pages.

3proxy     Combined proxy server may be used as
  Windows 95/98/NT/2000/XP/2003/Vista
  executable or service (supports installation and removal).
  It uses config file to read it's configuration (see
  3proxy.cfg.sample for details).
  --install installs and starts proxy as NT/2000/XP service
  (config file should be located in the same directory)
  --remove removes the service (should be stopped before via
  net stop 3proxy).
  3proxy.exe is all-in-one, it doesn't require all others .exe
  to work.
  See 3proxy.cfg.sample for examples, see man 3proxy.cfg
proxy     HTTP proxy server, binds to port 3128
ftppr     FTP proxy server, binds to port 21
socks     SOCKS 4/5 proxy server, binds to port 1080
ftppr  FTP proxy server, please do not mess it with FTP over HTTP
  proxy used in browsers
pop3p     POP3 proxy server, binds to port 110. You must specify
  POP3 username as username@target.host.ip[:port]
  port is 110 by default.
  Exmple: in Username configuration for you e-mail reader
  set someuser@pop.somehost.ru, to obtains mail for someuser
  from pop.somehost.ru via proxy.
smtpp     SMTP proxy server, binds to port 25. You must specify
  SMTP username as username@target.host.ip[:port]
  port is 25 by default.
  Exmple: in Username configuration for you e-mail reader
  set someuser@mail.somehost.ru, to send mail as someuser
  via mail.somehost.ru via proxy.
icqpr     ICQ/AIM proxy. Maps some TCP port to TCP port of ICQ
  server and performs packets translation. Example:
  icqpr 5190 login.icq.com 5190
msnpr  MSN proxy (beta)
tcppm     TCP port mapping. Maps some TCP port on local machine to
  TCP port on remote host.
udppm     UDP port mapping. Maps some UDP port on local machine to
  UDP port on remote machine. Only one user simulationeously
  can use UDP mapping, so it cann't be used for public service
  in large networks. It's OK to use it to map to DNS server
  in small network or to map Counter-Strike server for single
  client (you can use few mappings on different ports for
  different clients in last case).
mycrypt     Program to obtain crypted password fro cleartext. Supports
  both MD5/crypt and NT password.
   mycrypt password
  produces NT password
   mycrypt salt password
  produces MD5/crypt password with salt "salt".
dighosts     Utility for building networks list from web page.
countersutil Utility to manage counters file.

Run utility with --help option for command line reference.

Latest version is available from http://3proxy.ru/

from https://github.com/z3APA3A/3proxy
---------------------
 
Please read doc/html/index.html and man pages.

 Features:
  1. General
 + HTTP/1.1 Proxy with keep-alive client and server support,
          transparent proxy support.
 + Anonymous and random client emulation HTTP proxy mode
 + FTP over HTTP support.
 + DNS caching with built-in resolver
 + HTTPS (CONNECT) proxy
 + SOCKSv4/4.5 Proxy
 + SOCKSv5 Proxy
 + UDP and bind support for SOCKSv5 (fully compatible with
   SocksCAP/FreeCAP for UDP)
 + Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP, ICQ
 + POP3 Proxy
 + FTP proxy
 + DNS proxy
 + TCP port mapper
 + UDP port mapper
 + SMTP proxy
 + ICQ/AOL proxy
 + Threaded application (no child process).
 + Web administration and statistics
 + Plugins for functionality extension
 + Native 64 bit application for 64 bit OS, including 64-bit editions of
   Windows.
 + IPv6 support
  2. Proxy chaining and network connections
 + Connect back proxy support to bypass firewalls
 + Parent proxy support for any type of incoming connection
 + Username/password authentication for parent proxy(s).
 + HTTPS/SOCKS4/SOCKS5 and redirection parent support
 + Random parent selection
 + Chain building (multihop proxing)
 + Load balancing between few network connections by choosing network
   interface
  3. Logging
 + turnable log format compatible with any log parser
 + stdout logging
 + file logging
 + syslog logging (Unix)
 + ODBC logging
 + log file rotation (hourly, daily, weekly, monthly)
 + automatic log file comperssion with external archiver (for files)
 + automatic removal of older log files
 + Character filtering for log files
 + different log files for different servces are supported
  4. Access control
 + ACL-driven (user/source/destination/protocol/weekday/daytime or
 combined) bandwith limitation for incoming and (!)outgoing trafic.
 + ACL-driven (user/source/destination/protocol/weekday/daytime or
 combined) traffic limitation per day, week or month for incoming and
   (!) outgoing traffic
 + User authentication by DNS hostname
 + User authentication by username / password
 + Access control by username, source IP, destination IP, destination
 port and destination action (POST, PUT, GET, etc), weekday and daytime.
 + Access control by username/password for SOCKSv5 and HTTP/HTTPS/FTP
 + Cleartext or encrypted (crypt/MD5 or NT) passwords.
 + Connection redirection
 + Access control by requested action (CONNECT/BIND, 
   HTTP GET/POST/PUT/HEAD/OTHER).
 + NTLM (v1 only) authentication for HTTP proxy access
 + All access control entries now support weekday and time limitations
 + Hostnames and * templates are supported instead of IP address
  5. Extensions
 + Regular expression filtering (with PCRE) via PCREPlugin
   currently HTTP traffic only for URLs, HTTP headers and HTTP data.
 + Authentication with Windows username/password (cleartext only!)
 + SSL/TLS decryptions with certificate spoofing
 + NAT support under Linux
  6. Configuration
 + support for configuration files
 + support for includes in configuration files
 + interface binding
 + running as daemon process
 + utility for automated networks list building
 + configuration reload on any file change
     Unix
 + support for chroot
 + support for setgid
 + support for setuid
 + support for signals
     Windows
 + support --install as service
 + support --remove as service
 + support for service START, STOP, PAUSE and CONTINUE commands (on
 PAUSE no new connection accepted, but active connections still in
 progress, on CONTINUE configuration is reloaded)
     Windows 95/98/ME
 + support --install as service
 + support --remove as service
  6. Compilation
 + MSVC (static)
 + Intel Windows Compiler (msvcrt.dll)
 + Windows/gcc (msvcrt.dll)
 + Cygwin/gcc (cygwin.dll)
 + Unix/gcc
 + Unix/ccc
 + Solaris
 + Mac OS X, iPhone OS
 + Linux and derivered systems
 + Lite version for Windows 95/98/NT/2000/XP/2003
 + 32 bit and 64 bit versions for Windows Vista and above, Windows 2008 server and above 

3proxy     Combined proxy server may be used as
  executable or service (supports installation and removal).
  It uses config file to read it's configuration (see
  3proxy.cfg.sample for details).
  --install installs and starts proxy as Windows service
  (config file should be located in the same directory)
  --remove removes the service (should be stopped before via
  'net stop 3proxy').
  3proxy.exe is all-in-one, it doesn't require all others .exe
  to work.
  See 3proxy.cfg.sample for examples, see man 3proxy.cfg
proxy     HTTP proxy server, binds to port 3128
ftppr     FTP proxy server, binds to port 21
socks     SOCKS 4/5 proxy server, binds to port 1080
ftppr  FTP proxy server, please do not mess it with FTP over HTTP
  proxy used in browsers
pop3p     POP3 proxy server, binds to port 110. You must specify
  POP3 username as username@target.host.ip[:port]
  port is 110 by default.
  Exmple: in Username configuration for you e-mail reader
  set someuser@pop.somehost.ru, to obtains mail for someuser
  from pop.somehost.ru via proxy.
smtpp     SMTP proxy server, binds to port 25. You must specify
  SMTP username as username@target.host.ip[:port]
  port is 25 by default.
  Exmple: in Username configuration for you e-mail reader
  set someuser@mail.somehost.ru, to send mail as someuser
  via mail.somehost.ru via proxy.
icqpr     ICQ/AIM proxy. Maps some TCP port to TCP port of ICQ
  server and performs packets translation. Example:
  icqpr 5190 login.icq.com 5190
tcppm     TCP port mapping. Maps some TCP port on local machine to
  TCP port on remote host.
udppm     UDP port mapping. Maps some UDP port on local machine to
  UDP port on remote machine. Only one user simulationeously
  can use UDP mapping, so it cann't be used for public service
  in large networks. It's OK to use it to map to DNS server
  in small network or to map Counter-Strike server for single
  client (you can use few mappings on different ports for
  different clients in last case).
mycrypt     Program to obtain crypted password fro cleartext. Supports
  both MD5/crypt and NT password.
   mycrypt password
  produces NT password
   mycrypt salt password
  produces MD5/crypt password with salt "salt".
dighosts     Utility for building networks list from web page.


Run utility with --help option for command line reference.

Latest version is available from http://3proxy.ru/ 
from https://github.com/z3APA3A/3proxy 
------------
 
Now the actual Work starts to setup proxy server



Steps to follow : Install Ubuntu 14 when you purchase VPS and then run below commands in SSH terminal (Use Putty for SSH access)

  1. apt-get update
  2. apt-get -y install fail2ban software-properties-common
  3. apt-get install nano
  4. apt-get install build-essential libevent-dev libssl-dev
  5. cd /etc
  6. wget http://3proxy.ru/0.7.1.1/3proxy-0.7.1.1.tgz
  7. tar zxvf 3proxy-0.7.1.1.tgz
  8. rm 3proxy-0.7.1.1.tgz
  9. cd 3proxy
  10. nano src/proxy.h
  11. add line - #define ANONYMOUS 1 (this makes proxy anonymous)
  12. make -f Makefile.Linux
  13. make -f Makefile.Linux install
  14. mkdir log
  15. cd cfg
  16. nano 3proxy.cfg
  17. Add ips here along with Username : Password : Port in this format : proxy -p3128 -a -iYour Ip here -eYour Ip here
  18. Edit username and password in the same file in this format : users UsernameHere:CL:passwordHere
  19. Allow your username in the same file (You will see the Allow option , just add your username there)
  20. chmod 0777 3proxy.cfg
  21. cd ../
  22. nano scripts/rc.d/proxy.sh ( enter the directory where you installed 3Proxy script! )
  23. sh scripts/rc.d/proxy.sh start
  24. nano /etc/rc.local
  25. sh /etc/3proxy/scripts/rc.d/proxy.sh start
Summary of the above commands :
  1. Update Ubuntu
  2. Install Fail2ban
  3. Install Nano editor
  4. Install libevent and libssl
  5. Download 3Proxy script
  6. Unzip it to directory
  7. And edit the Proxy.h file through Nano and add line #define ANONYMOUS1
  8. Edit 3Proxy.cfg through Nano and add your ips along with port , username and password
  9. Then edit proxy.sh and enter where you installed 3Proxy
  10. Reboot the server and thats it !

Thats it , restart your server and your proxy server is ready.

from https://www.blackhatworld.com/seo/never-buy-proxies-again-setup-your-own-proxy-server.872539/
------------------

https://github.com/h1777/3proxy-socks
------------------

https://github.com/hidden-refuge/3proxy