DataOutputStream dos = new DataOutputStream(sock.getOutputStream());
dos.writeByte(0x04); // SOCKSv4(a)
dos.writeByte(0x01); // CONNECT
- dos.writeShort(http.port & 0xffff); // port
+ dos.writeShort(http.port & 0xffff); // port
if (addr == null) dos.writeInt(0x00000001); // bogus IP
else dos.write(addr.getAddress()); // actual IP
dos.writeByte(0x00); // no userid