|
|
|
@ -9,6 +9,9 @@ import android.view.View;
|
|
|
|
|
import android.widget.ProgressBar;
|
|
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
|
|
import java.io.BufferedReader;
|
|
|
|
|
import java.io.InputStreamReader;
|
|
|
|
|
import java.io.PrintWriter;
|
|
|
|
|
import java.net.Socket;
|
|
|
|
|
|
|
|
|
|
import goRicochetMobile.GoRicochetMobile;
|
|
|
|
@ -55,14 +58,34 @@ public class ConnectActivity extends AppCompatActivity {
|
|
|
|
|
|
|
|
|
|
Log.i(TAG, "Attempting manual java connection to tor control");
|
|
|
|
|
try {
|
|
|
|
|
Socket socket = new Socket("127.0.0.1", 5051);
|
|
|
|
|
Socket socket = new Socket("127.0.0.1", 9051);
|
|
|
|
|
PrintWriter out =
|
|
|
|
|
new PrintWriter(socket.getOutputStream(), true);
|
|
|
|
|
BufferedReader in =
|
|
|
|
|
new BufferedReader(
|
|
|
|
|
new InputStreamReader(socket.getInputStream()));
|
|
|
|
|
out.write("hello");
|
|
|
|
|
//String result = in.readLine();
|
|
|
|
|
Log.i(TAG, "wrote");
|
|
|
|
|
//in.close();
|
|
|
|
|
socket.close();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Log.e(TAG, e.toString());
|
|
|
|
|
Log.e(TAG, Log.getStackTraceString(e));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Log.i(TAG, "Go Net Test...");
|
|
|
|
|
try {
|
|
|
|
|
boolean ok = GoRicochetMobile.testNet();
|
|
|
|
|
Log.i(TAG, "NetTest: " + ok);
|
|
|
|
|
} catch(Exception e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Log.i(TAG, "Starting Echo Bot");
|
|
|
|
|
GoRicochetMobile.echoBot(privateKey);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|