2010-02-08 21:39:42 +01:00
|
|
|
/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
package org.torproject.android.service;
|
|
|
|
|
|
|
|
public interface TorServiceConstants {
|
|
|
|
|
2010-09-09 22:39:52 +02:00
|
|
|
public final static String TAG = "ORBOT";
|
2010-02-08 21:39:42 +01:00
|
|
|
|
2010-09-17 23:32:21 +02:00
|
|
|
public static boolean LOG_OUTPUT_TO_DEBUG = false;
|
2010-09-10 00:09:01 +02:00
|
|
|
|
2010-07-23 13:10:00 +02:00
|
|
|
public final static String TOR_APP_USERNAME = "org.torproject.android";
|
|
|
|
|
2010-07-31 17:43:56 +02:00
|
|
|
public final static String ASSETS_BASE = "assets/";
|
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
//home directory of Android application
|
2010-07-20 00:39:50 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
//name of the tor C binary
|
|
|
|
public final static String TOR_BINARY_ASSET_KEY = "tor";
|
|
|
|
|
|
|
|
//torrc (tor config file)
|
|
|
|
public final static String TORRC_ASSET_KEY = "torrc";
|
2010-07-31 17:43:56 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
//how to launch tor
|
2010-07-24 05:24:30 +02:00
|
|
|
// public final static String TOR_COMMAND_LINE_ARGS = "-f " + TORRC_INSTALL_PATH + " || exit\n";
|
2010-02-08 21:39:42 +01:00
|
|
|
|
|
|
|
//privoxy
|
|
|
|
public final static String PRIVOXY_ASSET_KEY = "privoxy";
|
|
|
|
|
|
|
|
//privoxy.config
|
|
|
|
public final static String PRIVOXYCONFIG_ASSET_KEY = "privoxy.config";
|
2010-07-31 17:43:56 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
//various console cmds
|
|
|
|
public final static String SHELL_CMD_CHMOD = "chmod";
|
|
|
|
public final static String SHELL_CMD_KILL = "kill";
|
|
|
|
public final static String SHELL_CMD_RM = "rm";
|
|
|
|
public final static String SHELL_CMD_PS = "ps";
|
2010-07-20 00:34:15 +02:00
|
|
|
public final static String SHELL_CMD_PIDOF = "pidof";
|
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
public final static String CHMOD_EXE_VALUE = "777";
|
|
|
|
|
|
|
|
//path of the installed APK file
|
|
|
|
public final static String APK_PATH = "/data/app/org.torproject.android.apk";
|
2010-07-24 05:24:30 +02:00
|
|
|
public final static String APK_PATH_BASE = "/data/app";
|
2010-06-09 22:14:03 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
public final static int FILE_WRITE_BUFFER_SIZE = 2048;
|
|
|
|
|
|
|
|
//HTTP Proxy server port
|
|
|
|
public final static int PORT_HTTP = 8118; //just like Privoxy!
|
|
|
|
|
|
|
|
//Socks port client connects to, server is the Tor binary
|
|
|
|
public final static int PORT_SOCKS = 9050;
|
|
|
|
|
|
|
|
//what is says!
|
|
|
|
public final static String IP_LOCALHOST = "127.0.0.1";
|
|
|
|
public final static int TOR_CONTROL_PORT = 9051;
|
|
|
|
public final static int UPDATE_TIMEOUT = 1000;
|
2010-09-17 18:52:41 +02:00
|
|
|
public final static int TOR_TRANSPROXY_PORT = 9040;
|
|
|
|
public final static int STANDARD_DNS_PORT = 53;
|
|
|
|
public final static int TOR_DNS_PORT = 5400;
|
2010-02-08 21:39:42 +01:00
|
|
|
|
|
|
|
//path to check Tor against
|
2010-07-20 00:39:50 +02:00
|
|
|
public final static String URL_TOR_CHECK = "https://check.torproject.org";
|
2010-02-08 21:39:42 +01:00
|
|
|
|
|
|
|
//IPTABLES
|
|
|
|
// public final static String CMD_IPTABLES_PREROUTING = "iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to 127.0.0.1:8118 || exit\n";
|
|
|
|
//public final static String CMD_IPTABLES_PREROUTING_FLUSH = "iptables -t nat -F || exit\n";
|
|
|
|
|
|
|
|
//control port
|
|
|
|
public final static String TOR_CONTROL_PORT_MSG_BOOTSTRAP_DONE = "Bootstrapped 100%";
|
|
|
|
|
2010-02-28 00:56:46 +01:00
|
|
|
public final static int STATUS_OFF = -1;
|
|
|
|
public final static int STATUS_READY = 0;
|
2010-02-08 21:39:42 +01:00
|
|
|
public final static int STATUS_ON = 1;
|
|
|
|
public final static int STATUS_CONNECTING = 2;
|
|
|
|
|
|
|
|
public final static int PROFILE_OFF = -1;
|
|
|
|
public final static int PROFILE_ON = 1;
|
|
|
|
}
|