NAME

sss.pl - Simple SOCKS5 Server for Perl


DESCRIPTION

SSS is a Simple SOCKS Server written in perl that implements the SOCKS v5 protocol.

It will accept username/password authentication.

The script runs in the background as a daemon.

HISTORY

Originally I was looking for a simple SOCKS5 Server (with user/pass auth) that would run as a non-root user on FreeBSD.

I checked the FreeBSD ports for various SOCKS5 solutions and tried them all, only to discover that each one had a reason why it would not work, or why I could not use it.

I figured this could be done in perl, but found that there was no well maintained perl based solutions.

I hacked together this solution (with help from public domain scripts) and cleaned it up, ready for release.

Its simple, a feature I intend to maintain, however there is scope for much more potential, especially with user feedback.

You can read the full story here: http://www.hm2k.com/posts/freebsd-socks-proxy-for-mirc

INSTALL

  wget http://ssspl.svn.sourceforge.net/viewvc/ssspl/sss.pl
  chmod 755 sss.pl

OR

  http://ssspl.svn.sourceforge.net/viewvc/ssspl.tar.gz?view=tar
  tar zxvf ssspl.tar.gz
  chmod 755 ssspl/sss.pl

USAGE

You run the script using the following command: ./sss.pl <local_host> <local_port> [auth_login(:auth_pass)] Note: the auth_pass must be an md5 (hex) hash eg: ./sss.pl hostname.example.com 34567 test:ae2b1fca515949e5d54fb22b8ed95575

Once up and running you can use the server in mIRC using the following command: /firewall [-cmN[+|-]d] [on|off] <server> <port> <userid> <password> For more information on this command issue: /help /firewall in mIRC. eg: /firewall -m5 on hostname.example.com 34567 test testing


PREREQUISITES

Operating System: Tested on FreeBSD 6.x and CentOS 4.x, should work on others.

Required modules: IO::Socket::INET, Digest::MD5.


CHANGES

v0.1.4 (03/05/10) - Improved documentation and logging subs
v0.1.3 (24/11/09) - Improved documentation and code
- PID is displayed during fork
- Added logging (for Katlyn`)
v0.1.2 (27/02/09) - Fixed a bug (Thanks Andreas)
v0.1.1 (02/10/08) - Improved documentation
v0.1 (12/09/08) - Initial release.


TODO


FAQ

Why is there multiple processes in my process list?

Each new connection spawns a new process, so it is easier to manage.

Why does $serverip in mIRC return 255.255.255.255?

255.255.255.255 is the default value of a non-resolved address (INADDR_NONE).

mIRC does not need to resolve the IRC server address.

See: http://tinyurl.com/yjs8kyf

Why is DCC SEND or DCC CHAT is not working?

It should work you may need to diagnose it further.

See: http://www.mirc.com/help/help-dcc.txt

How do I create an md5 hash?

In mIRC do: //echo -a $md5(password)

You can visit: http://hashtool.com/md5

I also added a -getmd5 option which you can use

Why doesnt this work with Mozilla Firefox?

Because Mozilla wont add SOCKS5 username/password auth support

Because Ive not added GSSAPI support yet (donations please)


NOTES


COPYRIGHT

Copyright (c) 2008-2010, HM2K. All rights reserved.

Released as Open Source under the BSD License.


LICENSE

        Redistribution and use in source and binary forms, with or without modification, are 
        permitted provided that the following conditions are met:
         * Redistributions of source code must retain the above copyright notice, this list of 
           conditions and the following disclaimer.
         * Redistributions in binary form must reproduce the above copyright notice, this list
           of conditions and the following disclaimer in the documentation and/or other
           materials provided with the distribution.
         * Neither the name of the author nor the names of its contributors may be used to 
           endorse or promote products derived from this software without specific prior 
           written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
        EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
        SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
        INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
        TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
        BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
        WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


CREDITS

Also, thanks to #perlhelp @ EFnet

any

Networking