Last active
August 29, 2015 13:59
-
-
Save lgawin/10827219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String... args) throws IOException { | |
String host = args[0]; | |
int port = Integer.parseInt(args[1]); | |
String botName = args[2]; | |
String botKey = args[3]; | |
System.out.println("Connecting to " + host + ":" + port + " as " | |
+ botName + "/" + botKey); | |
//final Socket socket = new Socket(host, port); | |
// --> | |
final Socket socket = new Socket(new Proxy(Proxy.Type.HTTP), new InetSocketAddress(PROXY_IP, PROXY_PORT)); | |
socket.connect(new InetSocketAddress(host, port)) | |
// <-- | |
final PrintWriter writer = new PrintWriter(new OutputStreamWriter( | |
socket.getOutputStream(), "utf-8")); | |
final BufferedReader reader = new BufferedReader(new InputStreamReader( | |
socket.getInputStream(), "utf-8")); | |
new Main(reader, writer, new Join(botName, botKey)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment