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 */
|
2015-06-10 23:39:57 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
package org.torproject.android.service;
|
|
|
|
|
2015-06-10 23:39:57 +02:00
|
|
|
import android.content.Intent;
|
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
public interface TorServiceConstants {
|
|
|
|
|
2010-07-23 13:10:00 +02:00
|
|
|
public final static String TOR_APP_USERNAME = "org.torproject.android";
|
2015-12-30 19:21:33 +01:00
|
|
|
public final static String BROWSER_APP_USERNAME = "info.guardianproject.orfox";
|
2010-07-23 13:10:00 +02:00
|
|
|
|
2014-04-08 22:09:04 +02:00
|
|
|
public final static String DIRECTORY_TOR_BINARY = "bin";
|
2014-04-08 21:31:15 +02:00
|
|
|
public final static String DIRECTORY_TOR_DATA = "data";
|
2010-07-20 00:39:50 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
//name of the tor C binary
|
2014-04-04 05:01:39 +02:00
|
|
|
public final static String TOR_ASSET_KEY = "tor";
|
2010-02-08 21:39:42 +01:00
|
|
|
|
|
|
|
//torrc (tor config file)
|
|
|
|
public final static String TORRC_ASSET_KEY = "torrc";
|
2014-04-17 16:16:49 +02:00
|
|
|
public final static String TORRCDIAG_ASSET_KEY = "torrcdiag";
|
2011-10-29 05:53:40 +02:00
|
|
|
public final static String TORRC_TETHER_KEY = "torrctether";
|
|
|
|
|
2011-04-15 18:37:33 +02:00
|
|
|
public final static String TOR_CONTROL_COOKIE = "control_auth_cookie";
|
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
//privoxy
|
2014-04-25 05:43:33 +02:00
|
|
|
public final static String POLIPO_ASSET_KEY = "polipo";
|
2010-02-08 21:39:42 +01:00
|
|
|
|
|
|
|
//privoxy.config
|
2014-04-25 05:43:33 +02:00
|
|
|
public final static String POLIPOCONFIG_ASSET_KEY = "torpolipo.conf";
|
2011-10-28 06:29:57 +02:00
|
|
|
|
|
|
|
//geoip data file asset key
|
|
|
|
public final static String GEOIP_ASSET_KEY = "geoip";
|
2014-01-10 03:32:07 +01:00
|
|
|
public final static String GEOIP6_ASSET_KEY = "geoip6";
|
|
|
|
|
2015-12-30 19:21:33 +01:00
|
|
|
//tun2socks VPN
|
|
|
|
public final static String TUN2SOCKS_ASSET_KEY = "tun2socks";
|
|
|
|
|
2011-10-28 06:29:57 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
//various console cmds
|
|
|
|
public final static String SHELL_CMD_CHMOD = "chmod";
|
2011-02-09 22:11:53 +01:00
|
|
|
public final static String SHELL_CMD_KILL = "kill -9";
|
2010-02-08 21:39:42 +01:00
|
|
|
public final static String SHELL_CMD_RM = "rm";
|
2014-06-11 13:51:22 +02:00
|
|
|
public final static String SHELL_CMD_PS = "toolbox ps";
|
2014-08-05 12:14:27 +02:00
|
|
|
public final static String SHELL_CMD_PS_ALT = "ps";
|
|
|
|
|
2014-04-10 04:53:08 +02:00
|
|
|
//public final static String SHELL_CMD_PIDOF = "pidof";
|
2013-12-28 03:43:55 +01:00
|
|
|
public final static String SHELL_CMD_LINK = "ln -s";
|
2014-01-14 03:48:28 +01:00
|
|
|
public final static String SHELL_CMD_CP = "cp";
|
2013-12-28 03:43:55 +01:00
|
|
|
|
2010-07-20 00:34:15 +02:00
|
|
|
|
2014-04-07 17:10:31 +02:00
|
|
|
public final static String CHMOD_EXE_VALUE = "770";
|
2010-06-09 22:14:03 +02:00
|
|
|
|
2014-04-08 17:37:45 +02:00
|
|
|
public final static int FILE_WRITE_BUFFER_SIZE = 1024;
|
2015-06-11 22:31:39 +02:00
|
|
|
|
2014-04-17 16:16:49 +02:00
|
|
|
public final static String IP_LOCALHOST = "127.0.0.1";
|
2010-02-08 21:39:42 +01:00
|
|
|
public final static int UPDATE_TIMEOUT = 1000;
|
2014-06-17 21:42:54 +02:00
|
|
|
public final static int TOR_TRANSPROXY_PORT_DEFAULT = 9040;
|
2015-12-30 19:21:33 +01:00
|
|
|
|
2010-09-17 18:52:41 +02:00
|
|
|
public final static int STANDARD_DNS_PORT = 53;
|
2014-06-17 21:42:54 +02:00
|
|
|
public final static int TOR_DNS_PORT_DEFAULT = 5400;
|
2015-12-30 19:21:33 +01:00
|
|
|
public final static String TOR_VPN_DNS_LISTEN_ADDRESS = "127.0.0.1";
|
|
|
|
|
|
|
|
public final static int CONTROL_PORT_DEFAULT = 9051;
|
2015-06-11 22:31:39 +02:00
|
|
|
public final static int HTTP_PROXY_PORT_DEFAULT = 8118; // like Privoxy!
|
|
|
|
public final static int SOCKS_PROXY_PORT_DEFAULT = 9050;
|
|
|
|
|
2015-12-30 19:21:33 +01:00
|
|
|
|
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
|
|
|
|
|
|
|
//control port
|
|
|
|
public final static String TOR_CONTROL_PORT_MSG_BOOTSTRAP_DONE = "Bootstrapped 100%";
|
2015-06-22 18:25:37 +02:00
|
|
|
public final static String LOG_NOTICE_HEADER = "NOTICE";
|
|
|
|
public final static String LOG_NOTICE_BOOTSTRAPPED = "Bootstrapped";
|
|
|
|
|
2015-06-10 23:39:57 +02:00
|
|
|
/**
|
|
|
|
* A request to Orbot to transparently start Tor services
|
|
|
|
*/
|
2015-06-10 20:46:05 +02:00
|
|
|
public final static String ACTION_START = "org.torproject.android.intent.action.START";
|
2015-06-10 23:39:57 +02:00
|
|
|
/**
|
|
|
|
* {@link Intent} send by Orbot with {@code ON/OFF/STARTING/STOPPING} status
|
|
|
|
*/
|
2015-06-09 02:04:29 +02:00
|
|
|
public final static String ACTION_STATUS = "org.torproject.android.intent.action.STATUS";
|
2015-06-10 23:39:57 +02:00
|
|
|
/**
|
|
|
|
* {@code String} that contains a status constant: {@link #STATUS_ON},
|
|
|
|
* {@link #STATUS_OFF}, {@link #STATUS_STARTING}, or
|
|
|
|
* {@link #STATUS_STOPPING}
|
|
|
|
*/
|
2015-06-09 02:04:29 +02:00
|
|
|
public final static String EXTRA_STATUS = "org.torproject.android.intent.extra.STATUS";
|
2015-06-10 23:39:57 +02:00
|
|
|
/**
|
|
|
|
* A {@link String} {@code packageName} for Orbot to direct its status reply
|
|
|
|
* to, used in {@link #ACTION_START} {@link Intent}s sent to Orbot
|
|
|
|
*/
|
|
|
|
public final static String EXTRA_PACKAGE_NAME = "org.torproject.android.intent.extra.PACKAGE_NAME";
|
2015-06-11 23:02:56 +02:00
|
|
|
/**
|
|
|
|
* The SOCKS proxy settings in URL form.
|
|
|
|
*/
|
|
|
|
public final static String EXTRA_SOCKS_PROXY = "org.torproject.android.intent.extra.SOCKS_PROXY";
|
|
|
|
public final static String EXTRA_SOCKS_PROXY_HOST = "org.torproject.android.intent.extra.SOCKS_PROXY_HOST";
|
|
|
|
public final static String EXTRA_SOCKS_PROXY_PORT = "org.torproject.android.intent.extra.SOCKS_PROXY_PORT";
|
|
|
|
/**
|
|
|
|
* The HTTP proxy settings in URL form.
|
|
|
|
*/
|
|
|
|
public final static String EXTRA_HTTP_PROXY = "org.torproject.android.intent.extra.HTTP_PROXY";
|
|
|
|
public final static String EXTRA_HTTP_PROXY_HOST = "org.torproject.android.intent.extra.HTTP_PROXY_HOST";
|
|
|
|
public final static String EXTRA_HTTP_PROXY_PORT = "org.torproject.android.intent.extra.HTTP_PROXY_PORT";
|
2015-06-09 21:30:28 +02:00
|
|
|
|
2015-06-09 02:04:29 +02:00
|
|
|
public final static String LOCAL_ACTION_LOG = "log";
|
2015-06-09 21:10:52 +02:00
|
|
|
public final static String LOCAL_ACTION_BANDWIDTH = "bandwidth";
|
2015-06-09 02:04:29 +02:00
|
|
|
public final static String LOCAL_EXTRA_LOG = "log";
|
|
|
|
|
2015-06-10 23:39:57 +02:00
|
|
|
/**
|
|
|
|
* All tor-related services and daemons are stopped
|
|
|
|
*/
|
2015-06-08 20:54:38 +02:00
|
|
|
public final static String STATUS_OFF = "OFF";
|
2015-06-10 23:39:57 +02:00
|
|
|
/**
|
|
|
|
* All tor-related services and daemons have completed starting
|
|
|
|
*/
|
2015-06-08 20:54:38 +02:00
|
|
|
public final static String STATUS_ON = "ON";
|
2015-06-09 17:23:56 +02:00
|
|
|
public final static String STATUS_STARTING = "STARTING";
|
|
|
|
public final static String STATUS_STOPPING = "STOPPING";
|
2015-06-11 00:15:29 +02:00
|
|
|
/**
|
|
|
|
* The user has disabled the ability for background starts triggered by
|
|
|
|
* apps. Fallback to the old Intent that brings up Orbot.
|
|
|
|
*/
|
|
|
|
public final static String STATUS_STARTS_DISABLED = "STARTS_DISABLED";
|
2015-06-09 23:02:21 +02:00
|
|
|
|
2015-06-10 23:39:57 +02:00
|
|
|
// actions for internal command Intents
|
2015-06-09 20:27:39 +02:00
|
|
|
public static final String CMD_SIGNAL_HUP = "signal_hup";
|
2015-06-17 17:00:48 +02:00
|
|
|
public static final String CMD_STATUS = "status";
|
2014-11-18 05:28:33 +01:00
|
|
|
public static final String CMD_FLUSH = "flush";
|
|
|
|
public static final String CMD_NEWNYM = "newnym";
|
|
|
|
public static final String CMD_VPN = "vpn";
|
2015-02-02 22:21:04 +01:00
|
|
|
public static final String CMD_VPN_CLEAR = "vpnclear";
|
2015-06-09 04:57:42 +02:00
|
|
|
public static final String CMD_UPDATE_TRANS_PROXY = "update";
|
2015-06-11 00:15:29 +02:00
|
|
|
|
2015-12-30 19:21:33 +01:00
|
|
|
public static final String BINARY_TOR_VERSION = "0.2.7.5";
|
2014-04-08 22:09:04 +02:00
|
|
|
public static final String PREF_BINARY_TOR_VERSION_INSTALLED = "BINARY_TOR_VERSION_INSTALLED";
|
2012-01-13 16:26:56 +01:00
|
|
|
|
2012-02-12 04:39:10 +01:00
|
|
|
//obfsproxy
|
2015-03-09 20:53:02 +01:00
|
|
|
public static final String OBFSCLIENT_ASSET_KEY = "obfs4proxy";
|
2012-01-13 16:26:56 +01:00
|
|
|
|
2015-02-14 06:44:09 +01:00
|
|
|
public static final String MEEK_ASSET_KEY = "meek-client";
|
2013-12-28 15:21:25 +01:00
|
|
|
//name of the iptables binary
|
2014-04-04 05:01:39 +02:00
|
|
|
public final static String IPTABLES_ASSET_KEY = "xtables";
|
2011-07-03 10:39:49 +02:00
|
|
|
|
2010-02-08 21:39:42 +01:00
|
|
|
}
|