0
我試圖做一個連接到代理的程序,但我有一個小問題,我已經寫了socksv4和v5協議,但我怎麼知道代理是哪個版本?我如何知道代理是否會說Socks v4或v5?
我沒有使用標準的java代理對象的原因是因爲我想使用套接字通道,我基本上必須手動完成。
無關代碼:
String getIP = jTextField1.getText();
String[] splitIP = getIP.split("\\.");
byte[] wbytes = new byte[9];
wbytes[0] = (byte) 0x04;
wbytes[1] = (byte) 0x01;
byte one = (byte) Integer.parseInt(splitIP[0]);
byte two = (byte) Integer.parseInt(splitIP[1]);
byte three = (byte) Integer.parseInt(splitIP[2]);
byte four = (byte) Integer.parseInt(splitIP[3]);
checkC = new int[liveCon.length];
int pSlot = liveCon.length;
int[] standBy = new int[liveCon.length];