 |
|
|
 |
|
 |
I'd like to install an https proxy server on my server, is it possible to change the code and let it run as an https proxy server? How can I do it?
I didn't find an open source https server. thanks for providing so good application.
|
|
|
|
 |
|
 |
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.
|
|
|
|
 |
|
 |
I put the following code inside public void Accept_Authentication() {} method in file CSocks5.java but still getting error HTTP/1.0 407 Proxy Authentication Required
Properties authSettings = System.getProperties();
authSettings.put("java.net.socks.username", "username");
authSettings.put("java.net.socks.password", "password");
System.setProperties(authSettings);
What can be done???
|
|
|
|
 |
|
 |
I tried in different style now. I got the RFC of SOCKS v5 authentication from http://tools.ietf.org/html/rfc1929. I applied it in this code, but still getting error
400 BAD REQUEST
Following is the modification done by me in CProxy.java file.
public void CreateSSLTunnel() throws Exception {
Log.Println("Initiating SSL Tunneling...");
String user="username";
String pass="password";
Log.Println("Initiating Authentication...");
byte ver = 0x01;
byte[] uname = user.getBytes();
byte[] passwd = pass.getBytes();
int size = 1 + uname.length + 1+ passwd.length +1;
byte[] headerData = new byte[size];
int next = 0;
headerData[next] = ver;
next++;
headerData[next] = (byte) uname.length;
next++;
int i;
for (i = 0; i < uname.length; i++) {
headerData[next + i] = uname[i];
}
next = next + i;
headerData[next] = (byte) passwd.length;
next++;
int j;
for (j = 0; j < passwd.length; j++) {
headerData[next + j] = passwd[j];
}
SendToServer(headerData);
String cmd = "CONNECT " + Host + ":" + comm.m_nServerPort + " HTTP/1.0" + EOL + EOL;
SendToServer(cmd.getBytes());
What next can be done? Reply. I want to implement authentication in it.
|
|
|
|
 |
|
 |
Excellent, Awesome, Really Impressed by this utility. Have no words to appreciate your work. Great Work.
|
|
|
|
 |
|
 |
Hello Svetoslav,
I was trying to run your code, but was facing some problems proxy settings. When I remove the DNS entries from the client connecting to the HTTP proxy, your code doesn't seem to work properly. Client is not able to access the net. thanks.....
|
|
|
|
 |
|
 |
1.what application should be installed on windows platform to run this project[SOCKS Proxy+SSL Tunnel].
2.java 5 is required or any other version.
3.give the steps to compile & run.
4.should we have online internet facility.
5.what protocol should system support.
6.what is the use of this project.
|
|
|
|
 |
|
 |
Java 1 and Internet connection are required
For purpose of this project - read its description.
compile using Java compiler from Java SDK:
c:\sshproxy>javac.exe *.java
run using Java VM:
c:\sshproxy>java.exe SSHProxy.class
|
|
|
|
 |
|
 |
Sorry, does not work for me on Vista. I extracted SocksProxy_src to /tmp/Socksproxy on my Vista-PC, started CMD and then in CMD-window java.exe SSHProxy.class Exception in thread "main" java.lang.NoClassDefFoundError: SSHProxy/class at java.net.URLClassLoader$1.run(Unknown Source) ...............
Any idea ß
|
|
|
|
 |
|
 |
What do I need to run the applet?
Thanks.
Manuel
|
|
|
|
 |
|
 |
from command prompt
c:\>appletviewer MyApplet.java
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi!
thank you for the helpful code you published.
i wanted to ask you a couple of questions:
when i examine the communication between the client and the server
(using ethereal) i dont understand the structure of some packets.
1) when the server replies to the connect command of the client it has
0.0.0.0 as remote address. shouldnt it be the address to which the
client should send the preceding packets?
2) to this the client replies with a packet with the version = 208.
3) then the server replies with a packet with a missing ATYP field.
4) afterwards, when the client sends the server the data, the packets
version field are 0.
is this how socksv5 works? if so - where is the appropriate documentation?
(i looked for it in rfc's 1928,1929)
thanks allot!
avi (avital.steinitz@gmail.com).
|
|
|
|
 |
|
 |
Sir,
- I am doing a project on HTTP Tunnel For a TCP Connection.
- i am able to connect to Server using the Connect method.
But Sir I have not Been able to bypass the Server and connect to another Client.
How Do i create an HTTP Tunnel.
I wawit your reply Sir
Yours Sincerely.
Priyanka
|
|
|
|
 |
|
 |
Hello Priyanka,
Probably your HTTP proxy is configured to allow connections to ports 80 and 443 only.
This is usual practice for security reasons - to not allow using the HTTP tunneling for non-web-browsing purposes.
|
|
|
|
 |
|
 |
I used to successfully browse using this software by setting the configuration as below, and configuring the browser properly, but from past few days I'm unable to do so... here is the error message I'm getting...
----------------------------------------------
S S H P R O X Y
SOCKS Proxy Server -> HTTP SSL tunnel Master
----------------------------------------------
Copyright (c) 1999 D-Bross www.d-bross.com
Free for non-commercial use.
----------------------------------------------
Params : None
Config File : "config.txt"
"config.txt": EnableLog=
"config.txt": SOCKSPort=
"config.txt": UseSHttpProxy=
"config.txt": SHttpProxyHost=
"config.txt": SHttpProxyPort=
----------------------------------------------
USE of SHTTP Proxy Enabled.
SHTTP Proxy Host : proxy.abc.com
SHTTP Proxy Port : 8080
---------------------------------------
Logging : On
---------------------------------------
SOCKS Proxy Port : 1088
---------------------------------------
SOCKS Server Created.
SOCKS Server Started.
SOCKS Server Listen at Port : 1088
Connection from :
Proxy Created.
Proxy Started.
Accepted SOCKS 5 Request.
SOCKS 5 - Accepts Auth. method 'NO_AUTH'
SOCKS 5 - Accepted SOCKS5 Command: "CONNECT"
Connecting...
Connected to
Connected to
SOCKS 5 - Reply to Client "SUCCESS"
Initiating SSL Tunneling...
SHTTP Proxy Reply : [HTTP/1.1 403 Forbidden
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html
Proxy-Connection: close
Connection: close
Content-Length: 725
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>
<BODY>
Access Denied (connect_method_denied)
|
Your request attempted a CONNECT to a port "80" that is not permitted by default.
|
This is typically caused by an HTTPS URL that uses a port other then the default of 443.
|
For assistance, contact your network support team.
|
</BODY></HTML>]
ERROR : java.lang.Exception: Error Response from SHTTP Proxy !
java.lang.Exception: Error Response from SHTTP Proxy !
at socksshttp.CProxy.CreateSSLTunnel(CProxy.java)
at socksshttp.CProxy.ProcessRelay(CProxy.java)
at socksshttp.CProxy.run(CProxy.java)
at java.lang.Thread.run(Unknown Source)
Proxy Closed.
Any clue what might be happening???
thanx.
|
|
|
|
 |
|
 |
It seems that the service "HTTP Tunneling" on your proxy were disabled.
|
|
|
|
 |
|
 |
Dear Svetoslav Tchekanov,
I m very thank full to you that you have created this software , I have not yet tested it but assumes that it will work as per my expectation. I m S/W engineer working on some project were i had one big problem I hope that using your s/w i can solve it. Let me describe you the problem if you have any comments and suggestion please let me know i would be glad to here from you and learn many things from you.
Problem Description
I m writing a client/Server s/w client is supposed to be an applet which will make raw socket connection to server but to my best knowledge this will be prevented by proxy if installed on client intranet , I hope that after using you s/w i can solve this problem.
If you any new idea of how to do it please let me know , basically i want my applet to be connected to the server as this applet will be used for conferencing .If I'm going to use URLConnection to a servlet then it will work as simple request/response way and for that it requires new connection , so i cant always get connected to the server.
I would be glad if you would help me solving this problem
I have try to mail you on your email address but the email returned back
Regards
Parana S Joshi
Pranay S Joshi
|
|
|
|
 |
|
 |
Hello Joshsi,
If your applet is going to be used from the web browser, the Java should automatically use proxies to establish connections (if direct connection is not possible).
If you are going to use the applet as a standalone application, you should take care to handle the proxies.
You need to study the SOCKS protocol and HTTP protocol to be able to use the proxies.
Also yuo could learn from the source code of the SSH Proxy.
Best regards,
Svetoslav
|
|
|
|
 |
|
 |
Hello Svetoslav,
I m very much thank full to you for your reply, I have taken your suggestion seriously and will surly go through SOCKS protocol and also from you source code.
Can you tell me how to use ur s/w when i run it it runs on 8888 port as per ur configuration now my question is who how come my application know to connect to internet using your s/w What i mean is how my application will communicate with your s/w. I have found some thing on the net and it is as follows
Client to Sock proxy
field 1: socks version number, 1 byte, must be 0x05 for this version
field 2: command code, 1 byte:-
0x01 = establish a tcp/ip stream connection
0x02 = establish a tcp/ip port binding
0x03 = associate a udp port
field 3: reserved, must be 0x00
field 4: address type, 1 byte:-
0x01 = IP V4 address (address field is 4 bytes long)
0x03 = Domain name (address field is variable)
0x04 = IP V6 address (address field is 16 bytes long)
field 5: destination address, 4/16 bytes or 1+domain name length.
If address type is 0x03 then the address consists of a length byte followed by the domain name.
field 6: network byte order port number, 2 bytes
This means that i should first connect to SOCK Proxy pass this parameter and wait for its response
If I'm wrong please correct me , mean while i will just check it if this works fine.
And another question is can my applet make raw TCP connection to remote server using sock proxy I need to over come firewall.
I would be glad if u give me your valuable suggestions
With Best Regards
Pranay S Joshi
|
|
|
|
 |
|
 |
Hello Joshi,
To use the SSH Proxy from your program you have to:
1. Connect via TCP socket to the SSH Proxy
2. Prepare byte array, containing the SOCKS request (the format you found)
3. Send the request to the SOCKS proxy
4. Read the responso from the proxy
5. Analyze the response
If the response is positive, now you are connected to the destination, just like
you are directly connected (just like raw socket without proxy).
And you can use the TCP socket connection as you like.
I hope I answered the both of your questions.
Note> You can study the SOCKS commands format from the SSH proxy source code.
SOCKS 5 RFC: http://www.faqs.org/rfcs/rfc1928.html
SOCKS 4 RFC: http://socks.permeo.com/protocol/socks4.protocol
Best regards,
Svetoslav
|
|
|
|
 |
|
 |
Hello Svetoslav ,
Thanks for your response I m very much thankfull to you both for your code and your help , I hope i have not troubled you a lot.
with best Regards
Pranay S Joshi
|
|
|
|
 |
|
 |
hello sir...
m lookin 4 a java code...4 a firewall system in college...can socks4 is right one for it...or else can u help me in dis..???
|
|
|
|
 |