Click here to Skip to main content
Click here to Skip to main content

SOCKS Proxy + SSL Tunnel

By , 22 Feb 2000
Rate this:
Please Sign up or sign in to vote.
  • Download source files - 41 Kb
  • The SSH Proxy is full featured SOCKS Proxy written in Java.
    It supports both versions 4 and 5 of Socks protocol.

    Additional feature that I have implemented in SSH Proxy is the possibility to make TCP connections through an HTTP-SSL Tunnel.

    SSH Proxy works in two modes:

    1. Normal mode - works as normal SOCKS Proxy
    2. TCP via SHTTP mode - Works as SOCKS Proxy but makes SOCKS TCP connections via HTTP-SSL Tunnel Proxy.

    Sample Image 1
    Sample Image 2

    The TCP via SHTTP mode is very useful when user woks behind HTTP Proxy and hasn't any other acces to the Internet. In this case the user can run SSH Proxy on his/her machine, and configure it to use TCP connections via HTTP-SSL tunnels which are commonly supported by most proxies. This way he/she will be able to use other internet applications, eg. IRC, FTP, e-mail, telnet, HTTP (of course Smile | :) but without caching and etc.

    But if SSH Proxy works behind a firewall (in SSL tunnel mode) - the other SOCKS commands BIND and UDP association will not work.

    SSH Proxy loads its configuration from file config.txt which should be in the directory of the SSH Proxy

    # Copyright (c) 2000 Svetoslav Tchekanov (swetoslav@iname.com)
    #-------------------------------
    #EnableLog=no
    EnableLog=yes
    #-------------------------------
    SOCKSPort=8888
    #-------------------------------
    #UseSHttpProxy=1
    UseSHttpProxy=0
    SHttpProxyHost=<SHTTP Proxy Host/IP>
    SHttpProxyPort=<SHTTP Proxy Port>
    

    The variables UseSHttpProxy and EnableLog are logical. So you can specify their values either by 1, 0, Yes or No.

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    About the Author

    Svetoslav Chekanov
    Web Developer
    Bulgaria Bulgaria
    I am a software development engineer.
    I am a programmer.
    And my projects can explain what I am.

     
    Programming Languages: C/C++ - 10 yr., Java - 6 yr., Delphi -7 yr., HTML - 6 yr., CGI, Servlets, EJB, Assembly, CNC G-language
    RDBMS Microsoft SQL Server 7.0, MySQL, MS Access, ODBC, JDBC
     
    Networking: TCP/IP, Winsock, HTTP, HTTPS, FTP, SMTP, POP3, TELNET, IMAP, SOCKS 4/5, RTSP, CGI, MS Internet Information Server
     
    The great projects, ordered by greatness:
  • Java Virtual Machine
  • Application Server + Internet Proxy Services
  • Instant Messenger - like MSN and Yahoo ones
  • Voicer - Freeware VoIP application
  • SSH Proxy - SOCKS 4&5 Proxy that can relay TCP Connections through HTTPS Proxy
  • HTTP Proxy
  • SOCKS proxy
  • Battery Test Suite
  • Internet Address Book - Synchronizes local Outlook, Outlook Express, Netscape and Eudora address book with database on WEB server located in the Internet
  • Advertising Screen Saver - Screen Saver that sends e-mails and gain prizes for the computer owner
  • Proxy Send Mail - Send Mail service that can send e-mails through SOCKS 4, SOCKS 5 and HTTPS proxies
  • Proxy Hunter - Very fast, and also works as proxy checker
  • Java Disassembler
  • CNC Gravuring System
  • Little DOS games - when I was schoolboy
  •  
    More information about my current work you can find here:
    www.d-bross.com
    www.d-voicer.com
    www.d-tunnel.com


    Comments and Discussions

     
    QuestionAct as proxy in a special way? PinmemberAshesOfTime17-Jun-13 2:05 
    AnswerRe: Act as proxy in a special way? PinmemberSvetoslav Chekanov18-Jun-13 21:01 
    GeneralMy vote of 5 PinmemberMember 43208446-Jan-12 0:35 
    QuestionHow to change this application to a HTTPS proxy server? Pinmembershewo5-Dec-11 14:37 
    QuestionGetting Error Because of Proxy Authentication Required PinmemberWindowsVsLinux14-Nov-11 23:09 
    Hi, Thanks for such a useful utility.
    I am getting error because my Squid Proxy Server requires authentication to connect. Below is the error which I am getting.
     
    Error while using firefox in Socks v4
     
    Socks 4 reply: "Request GRANTED"
    Initiating SSL Tunneling...
    SHTTP Proxy Reply : [HTTP/1.0 407 Proxy Authentication Required
    Server: squid/3.1.6
    Mime-Version: 1.0
    Date: Mon, 14 Nov 2011 04:40:22 GMT
    Content-Type: text/html
    Content-Length: 3134

     
    Error while using firefox in Socks v5

    SOCKS 5 - Reply to Client "SUCCESS"
    Initiating SSL Tunneling...
    SHTTP Proxy Reply : [HTTP/1.0 407 Proxy Authentication Required
    Server: squid/3.1.6
    Mime-Version: 1.0
    Date: Mon, 14 Nov 2011 05:19:12 GMT

     
    Where should i have to make changes in the code? Should i modify the code at socket deceleration port. The web http://www.socks.nec.com/ is not working. So i am unable to get any hint for applying the authentication in the code.
     
    Please help. Thank you.
    AnswerRe: Getting Error Because of Proxy Authentication Required PinmemberWindowsVsLinux15-Nov-11 3:31 
    GeneralRe: Getting Error Because of Proxy Authentication Required PinmemberWindowsVsLinux15-Nov-11 9:55 
    GeneralMy vote of 5 PinmemberWindowsVsLinux13-Nov-11 12:01 
    GeneralDNS Query Pinmemberkshitij22325-Mar-10 21:43 
    Questionhow to run this project & to see how it works Pinmembernuthanhebbar11-Jan-09 20:16 
    AnswerRe: how to run this project & to see how it works PinmemberSvetoslav Chekanov28-Mar-11 20:20 
    GeneralRe: how to run this project & to see how it works Pinmemberreinerotto2-Sep-11 3:23 
    QuestionHow do I run the applet? PinmemberDarklomba1-Aug-07 10:44 
    AnswerRe: How do I run the applet? PinmemberSyed Mohammed Khawar27-Mar-11 20:59 
    GeneralRe: How do I run the applet? PinmemberSvetoslav Chekanov28-Mar-11 20:16 
    AnswerRe: How do I run the applet? PinmemberSvetoslav Chekanov28-Mar-11 20:17 
    Generalprotocol detailed specifications Pinmemberavinu28-Jul-07 21:58 
    QuestionHTTP Tunnel PinmemberPriyanka Bindumahavan29-Jan-07 22:26 
    AnswerRe: HTTP Tunnel Pinmembersv_chekanov11-Jan-09 21:06 
    GeneralNew problem.. need help. Pinmemberaddagol14-Dec-06 2:52 
    GeneralRe: New problem.. need help. PinmemberSvetoslav Chekanov5-Aug-07 20:20 
    GeneralThank You and One question PinmemberJoshi Pranay22-Oct-06 6:54 
    GeneralRe: Thank You and One question PinmemberSvetoslav Chekanov23-Oct-06 5:38 
    GeneralRe: Thank You and One question PinmemberJoshi Pranay23-Oct-06 7:45 
    GeneralRe: Thank You and One question PinmemberSvetoslav Chekanov23-Oct-06 21:01 
    GeneralRe: Thank You and One question PinmemberJoshi Pranay25-Oct-06 8:25 
    Generalabout firewall in java Pinmembermeetbecks11-Oct-06 6:00 
    Generaloperating system user Pinmembervanichopra23-May-06 17:53 
    GeneralABOUT UDP its urgent Pinmemberpearlstar17-May-06 21:59 
    GeneralUDP support Pinmemberpearlstar9-May-06 21:13 
    GeneralRe: UDP support PinmemberSvetoslav Chekanov17-May-06 22:37 
    Generalauthentication by name/passpord Pinmemberpearlstar9-May-06 8:47 
    GeneralRe: authentication by name/passpord PinmemberSvetoslav Chekanov9-May-06 20:57 
    GeneralRe: authentication by name/passpord Pinmemberwira_redi25-May-09 19:13 
    Generalneeded help to understand concept of socket Pinmemberpearlstar5-Apr-06 10:03 
    GeneralRe: needed help to understand concept of socket PinmemberSvetoslav Chekanov5-Apr-06 22:30 
    GeneralRe: needed help to understand concept of socket Pinmemberpearlstar7-Apr-06 4:37 
    QuestionHow to use socks5 Pinmemberpearlstar2-Apr-06 20:36 
    AnswerRe: How to use socks5 PinmemberSvetoslav Chekanov2-Apr-06 20:41 
    GeneralA new Problem Pinmemberjaramillo.santi23-Mar-06 17:03 
    GeneralRe: A new Problem Pinmemberjaramillo.santi23-Mar-06 17:17 
    GeneralProblem... Pinmemberjaramillo.santi24-Jan-06 17:59 
    GeneralRe: Problem... Pinmemberpearlstar28-Feb-06 18:11 
    GeneralWebsite proxy server Pinmemberpvdwalt77726-Nov-05 5:19 
    GeneralWorks only on one machine. Pinmembervivekvsb5-Nov-05 22:26 
    Generalsocks doubt Pinmemberpsaras3-Nov-05 20:33 
    GeneralPlease Help with SOCKS Pinmembermattoqua23-Oct-05 9:04 
    QuestionIs there a way to make this work with proxy server which requires username and password? Pinmemberpetelam12-Oct-05 7:40 
    Generaltunneling internet connection through one tcp/ip connection to remote server Pinmemberz__one15-Jun-05 23:46 
    GeneralRe: tunneling internet connection through one tcp/ip connection to remote server PinmemberSvetoslav Chekanov16-Jun-05 0:51 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Mobile
    Web04 | 2.8.140421.2 | Last Updated 23 Feb 2000
    Article Copyright 2000 by Svetoslav Chekanov
    Everything else Copyright © CodeProject, 1999-2014
    Terms of Use
    Layout: fixed | fluid