Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b571e2a94 | ||
|
|
ba30697309 | ||
|
|
879e25bb82 | ||
|
|
17c858d24c | ||
|
|
71a6531835 | ||
|
|
5d760382d7 | ||
|
|
4dda36673a | ||
|
|
5aca55cb8f | ||
|
|
82f14f0d07 | ||
|
|
c0e968ac34 |
@@ -3,8 +3,8 @@ apply plugin: 'kotlin-android'
|
|||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
buildToolsVersion '27.0.3'
|
buildToolsVersion '28.0.3'
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
targetCompatibility = "8"
|
targetCompatibility = "8"
|
||||||
@@ -16,8 +16,8 @@ android {
|
|||||||
minSdkVersion 17
|
minSdkVersion 17
|
||||||
targetSdkVersion Integer.parseInt("$targetSdkVer")
|
targetSdkVersion Integer.parseInt("$targetSdkVer")
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
versionCode 206
|
versionCode 212
|
||||||
versionName "0.6.21"
|
versionName "1.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -96,7 +96,7 @@ dependencies {
|
|||||||
implementation "org.jetbrains.anko:anko-support-v4:$ankoVersion"
|
implementation "org.jetbrains.anko:anko-support-v4:$ankoVersion"
|
||||||
implementation "org.jetbrains.anko:anko-appcompat-v7:$ankoVersion"
|
implementation "org.jetbrains.anko:anko-appcompat-v7:$ankoVersion"
|
||||||
implementation "org.jetbrains.anko:anko-design:$ankoVersion"
|
implementation "org.jetbrains.anko:anko-design:$ankoVersion"
|
||||||
implementation 'com.google.code.gson:gson:2.8.2'
|
implementation 'com.google.code.gson:gson:2.8.5'
|
||||||
implementation 'io.reactivex:rxjava:1.3.4'
|
implementation 'io.reactivex:rxjava:1.3.4'
|
||||||
implementation 'io.reactivex:rxandroid:1.2.1'
|
implementation 'io.reactivex:rxandroid:1.2.1'
|
||||||
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
|
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
|
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
|
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
|
||||||
<application
|
<application
|
||||||
android:name=".AngApplication"
|
android:name=".AngApplication"
|
||||||
|
|||||||
@@ -55,8 +55,7 @@ class V2RayVpnService : VpnService() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val v2rayPoint = Libv2ray.newV2RayPoint()
|
private val v2rayPoint = Libv2ray.newV2RayPoint(V2RayCallback())
|
||||||
private val v2rayCallback = V2RayCallback()
|
|
||||||
private lateinit var configContent: String
|
private lateinit var configContent: String
|
||||||
private lateinit var mInterface: ParcelFileDescriptor
|
private lateinit var mInterface: ParcelFileDescriptor
|
||||||
val fd: Int get() = mInterface.fd
|
val fd: Int get() = mInterface.fd
|
||||||
@@ -110,9 +109,13 @@ class V2RayVpnService : VpnService() {
|
|||||||
stopV2Ray()
|
stopV2Ray()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onLowMemory() {
|
||||||
|
stopV2Ray()
|
||||||
|
super.onLowMemory()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
|
||||||
cancelNotification()
|
cancelNotification()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,22 +183,11 @@ class V2RayVpnService : VpnService() {
|
|||||||
// Create a new interface using the builder and save the parameters.
|
// Create a new interface using the builder and save the parameters.
|
||||||
mInterface = builder.establish()
|
mInterface = builder.establish()
|
||||||
sendFd()
|
sendFd()
|
||||||
|
startSpeedNotification()
|
||||||
if (defaultDPreference.getPrefBoolean(SettingsActivity.PREF_SPEED_ENABLED, false)) {
|
|
||||||
mSubscription = Observable.interval(3, java.util.concurrent.TimeUnit.SECONDS)
|
|
||||||
.subscribe {
|
|
||||||
val uplink = v2rayPoint.queryStats("socks", "uplink")
|
|
||||||
val downlink = v2rayPoint.queryStats("socks", "downlink")
|
|
||||||
updateNotification("${(uplink / 3).toSpeedString()} ↑ ${(downlink / 3).toSpeedString()} ↓")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun shutdown() {
|
fun shutdown() {
|
||||||
try {
|
stopV2Ray(true)
|
||||||
mInterface.close()
|
|
||||||
} catch (ignored: Exception) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun sendFd() {
|
fun sendFd() {
|
||||||
@@ -231,12 +223,15 @@ class V2RayVpnService : VpnService() {
|
|||||||
if (!v2rayPoint.isRunning) {
|
if (!v2rayPoint.isRunning) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
registerReceiver(mMsgReceive, IntentFilter(AppConfig.BROADCAST_ACTION_SERVICE))
|
val mFilter = IntentFilter(AppConfig.BROADCAST_ACTION_SERVICE)
|
||||||
|
mFilter.addAction(Intent.ACTION_SCREEN_ON)
|
||||||
|
mFilter.addAction(Intent.ACTION_SCREEN_OFF)
|
||||||
|
mFilter.addAction(Intent.ACTION_USER_PRESENT)
|
||||||
|
registerReceiver(mMsgReceive, mFilter)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
|
|
||||||
configContent = defaultDPreference.getPrefString(AppConfig.PREF_CURR_CONFIG, "")
|
configContent = defaultDPreference.getPrefString(AppConfig.PREF_CURR_CONFIG, "")
|
||||||
v2rayPoint.supportSet = v2rayCallback
|
|
||||||
v2rayPoint.configureFileContent = configContent
|
v2rayPoint.configureFileContent = configContent
|
||||||
v2rayPoint.enableLocalDNS = defaultDPreference.getPrefBoolean(SettingsActivity.PREF_LOCAL_DNS_ENABLED, false)
|
v2rayPoint.enableLocalDNS = defaultDPreference.getPrefBoolean(SettingsActivity.PREF_LOCAL_DNS_ENABLED, false)
|
||||||
v2rayPoint.forwardIpv6 = defaultDPreference.getPrefBoolean(SettingsActivity.PREF_FORWARD_IPV6, false)
|
v2rayPoint.forwardIpv6 = defaultDPreference.getPrefBoolean(SettingsActivity.PREF_FORWARD_IPV6, false)
|
||||||
@@ -321,7 +316,6 @@ class V2RayVpnService : VpnService() {
|
|||||||
mBuilder = NotificationCompat.Builder(applicationContext, channelId)
|
mBuilder = NotificationCompat.Builder(applicationContext, channelId)
|
||||||
.setSmallIcon(R.drawable.ic_v)
|
.setSmallIcon(R.drawable.ic_v)
|
||||||
.setContentTitle(defaultDPreference.getPrefString(AppConfig.PREF_CURR_CONFIG_NAME, ""))
|
.setContentTitle(defaultDPreference.getPrefString(AppConfig.PREF_CURR_CONFIG_NAME, ""))
|
||||||
.setContentText(getString(R.string.notification_action_more))
|
|
||||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setShowWhen(false)
|
.setShowWhen(false)
|
||||||
@@ -359,7 +353,7 @@ class V2RayVpnService : VpnService() {
|
|||||||
|
|
||||||
private fun updateNotification(contentText: String) {
|
private fun updateNotification(contentText: String) {
|
||||||
if (mBuilder != null) {
|
if (mBuilder != null) {
|
||||||
mBuilder?.setContentText(contentText)
|
mBuilder?.setContentTitle(contentText)
|
||||||
getNotificationManager().notify(NOTIFICATION_ID, mBuilder?.build())
|
getNotificationManager().notify(NOTIFICATION_ID, mBuilder?.build())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,8 +365,41 @@ class V2RayVpnService : VpnService() {
|
|||||||
return mNotificationManager!!
|
return mNotificationManager!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun startSpeedNotification() {
|
||||||
|
if (mSubscription == null &&
|
||||||
|
v2rayPoint.isRunning &&
|
||||||
|
defaultDPreference.getPrefBoolean(SettingsActivity.PREF_SPEED_ENABLED, false)) {
|
||||||
|
val cf_name = defaultDPreference.getPrefString(AppConfig.PREF_CURR_CONFIG_NAME, "")
|
||||||
|
var last_zero_speed = false
|
||||||
|
|
||||||
|
mSubscription = Observable.interval(3, java.util.concurrent.TimeUnit.SECONDS)
|
||||||
|
.subscribe {
|
||||||
|
val uplink = v2rayPoint.queryStats("socks", "uplink")
|
||||||
|
val downlink = v2rayPoint.queryStats("socks", "downlink")
|
||||||
|
val zero_speed = (uplink == 0L && downlink == 0L)
|
||||||
|
if (!zero_speed || !last_zero_speed) {
|
||||||
|
updateNotification("${cf_name} • ${(uplink / 3).toSpeedString()}↑ ${(downlink / 3).toSpeedString()}↓")
|
||||||
|
}
|
||||||
|
last_zero_speed = zero_speed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun stopSpeedNotification() {
|
||||||
|
if (mSubscription != null) {
|
||||||
|
mSubscription?.unsubscribe() //stop queryStats
|
||||||
|
mSubscription = null
|
||||||
|
|
||||||
|
val cf_name = defaultDPreference.getPrefString(AppConfig.PREF_CURR_CONFIG_NAME, "")
|
||||||
|
updateNotification(cf_name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private inner class V2RayCallback : V2RayVPNServiceSupportsSet {
|
private inner class V2RayCallback : V2RayVPNServiceSupportsSet {
|
||||||
override fun shutdown(): Long {
|
override fun shutdown(): Long {
|
||||||
|
// called by go
|
||||||
|
// shutdown the whole vpn service
|
||||||
try {
|
try {
|
||||||
this@V2RayVpnService.shutdown()
|
this@V2RayVpnService.shutdown()
|
||||||
return 0
|
return 0
|
||||||
@@ -447,6 +474,17 @@ class V2RayVpnService : VpnService() {
|
|||||||
vpnService?.startV2ray()
|
vpnService?.startV2ray()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
when (intent?.action) {
|
||||||
|
Intent.ACTION_SCREEN_OFF -> {
|
||||||
|
Log.d(AppConfig.ANG_PACKAGE, "SCREEN_OFF, stop querying stats")
|
||||||
|
vpnService?.stopSpeedNotification()
|
||||||
|
}
|
||||||
|
Intent.ACTION_SCREEN_ON -> {
|
||||||
|
Log.d(AppConfig.ANG_PACKAGE, "SCREEN_ON, start querying stats")
|
||||||
|
vpnService?.startSpeedNotification()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class PerAppProxyActivity : BaseActivity() {
|
|||||||
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
var dst = 0
|
var dst = 0
|
||||||
val threshold = resources.getDimensionPixelSize(R.dimen.bypass_list_header_height) * 3
|
val threshold = resources.getDimensionPixelSize(R.dimen.bypass_list_header_height) * 3
|
||||||
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
dst += dy
|
dst += dy
|
||||||
if (dst > threshold) {
|
if (dst > threshold) {
|
||||||
header_view.hide()
|
header_view.hide()
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class PerAppProxyAdapter(val activity: BaseActivity, val apps: List<AppInfo>, bl
|
|||||||
|
|
||||||
val icon = itemView.icon!!
|
val icon = itemView.icon!!
|
||||||
val name = itemView.name!!
|
val name = itemView.name!!
|
||||||
|
val package_name = itemView.package_name!!
|
||||||
val checkBox = itemView.check_box!!
|
val checkBox = itemView.check_box!!
|
||||||
|
|
||||||
fun bind(appInfo: AppInfo) {
|
fun bind(appInfo: AppInfo) {
|
||||||
@@ -71,10 +72,7 @@ class PerAppProxyAdapter(val activity: BaseActivity, val apps: List<AppInfo>, bl
|
|||||||
// name.text = appInfo.appName
|
// name.text = appInfo.appName
|
||||||
|
|
||||||
checkBox.isChecked = inBlacklist
|
checkBox.isChecked = inBlacklist
|
||||||
|
package_name.text = appInfo.packageName
|
||||||
// name.textColor = mActivity.resources.getColor(if (appInfo.isSystemApp)
|
|
||||||
// R.color.color_highlight_material else R.color.abc_secondary_text_material_light)
|
|
||||||
|
|
||||||
if (appInfo.isSystemApp) {
|
if (appInfo.isSystemApp) {
|
||||||
name.text = String.format("** %1s", appInfo.appName)
|
name.text = String.format("** %1s", appInfo.appName)
|
||||||
name.textColor = Color.RED
|
name.textColor = Color.RED
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class SettingsActivity : BaseActivity() {
|
|||||||
const val PREF_DOMESTIC_DNS = "pref_domestic_dns"
|
const val PREF_DOMESTIC_DNS = "pref_domestic_dns"
|
||||||
|
|
||||||
// const val PREF_SOCKS_PORT = "pref_socks_port"
|
// const val PREF_SOCKS_PORT = "pref_socks_port"
|
||||||
// const val PREF_LANCONN_PORT = "pref_lanconn_port"
|
// const val PREF_HTTP_PORT = "pref_http_port"
|
||||||
|
|
||||||
const val PREF_ROUTING_DOMAIN_STRATEGY = "pref_routing_domain_strategy"
|
const val PREF_ROUTING_DOMAIN_STRATEGY = "pref_routing_domain_strategy"
|
||||||
const val PREF_ROUTING_MODE = "pref_routing_mode"
|
const val PREF_ROUTING_MODE = "pref_routing_mode"
|
||||||
@@ -67,7 +67,7 @@ class SettingsActivity : BaseActivity() {
|
|||||||
val forwardIpv6 by lazy { findPreference(PREF_FORWARD_IPV6) as CheckBoxPreference }
|
val forwardIpv6 by lazy { findPreference(PREF_FORWARD_IPV6) as CheckBoxPreference }
|
||||||
|
|
||||||
// val socksPort by lazy { findPreference(PREF_SOCKS_PORT) as EditTextPreference }
|
// val socksPort by lazy { findPreference(PREF_SOCKS_PORT) as EditTextPreference }
|
||||||
// val lanconnPort by lazy { findPreference(PREF_LANCONN_PORT) as EditTextPreference }
|
// val httpPort by lazy { findPreference(PREF_HTTP_PORT) as EditTextPreference }
|
||||||
|
|
||||||
val routingCustom: Preference by lazy { findPreference(PREF_ROUTING_CUSTOM) }
|
val routingCustom: Preference by lazy { findPreference(PREF_ROUTING_CUSTOM) }
|
||||||
// val donate: Preference by lazy { findPreference(PREF_DONATE) }
|
// val donate: Preference by lazy { findPreference(PREF_DONATE) }
|
||||||
@@ -132,8 +132,8 @@ class SettingsActivity : BaseActivity() {
|
|||||||
// socksPort.summary = any as String
|
// socksPort.summary = any as String
|
||||||
// true
|
// true
|
||||||
// }
|
// }
|
||||||
// lanconnPort.setOnPreferenceChangeListener { preference, any ->
|
// httpPort.setOnPreferenceChangeListener { preference, any ->
|
||||||
// lanconnPort.summary = any as String
|
// httpPort.summary = any as String
|
||||||
// true
|
// true
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ class SettingsActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// socksPort.summary = defaultSharedPreferences.getString(PREF_SOCKS_PORT, "10808")
|
// socksPort.summary = defaultSharedPreferences.getString(PREF_SOCKS_PORT, "10808")
|
||||||
// lanconnPort.summary = defaultSharedPreferences.getString(PREF_LANCONN_PORT, "")
|
// lanconnPort.summary = defaultSharedPreferences.getString(PREF_HTTP_PORT, "")
|
||||||
|
|
||||||
defaultSharedPreferences.registerOnSharedPreferenceChangeListener(this)
|
defaultSharedPreferences.registerOnSharedPreferenceChangeListener(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ object V2rayConfigUtil {
|
|||||||
try {
|
try {
|
||||||
v2rayConfig.inbounds[0].port = 10808
|
v2rayConfig.inbounds[0].port = 10808
|
||||||
// val socksPort = Utils.parseInt(app.defaultDPreference.getPrefString(SettingsActivity.PREF_SOCKS_PORT, "10808"))
|
// val socksPort = Utils.parseInt(app.defaultDPreference.getPrefString(SettingsActivity.PREF_SOCKS_PORT, "10808"))
|
||||||
// val lanconnPort = Utils.parseInt(app.defaultDPreference.getPrefString(SettingsActivity.PREF_LANCONN_PORT, ""))
|
// val lanconnPort = Utils.parseInt(app.defaultDPreference.getPrefString(SettingsActivity.PREF_HTTP_PORT, ""))
|
||||||
|
|
||||||
// if (socksPort > 0) {
|
// if (socksPort > 0) {
|
||||||
// v2rayConfig.inbounds[0].port = socksPort
|
// v2rayConfig.inbounds[0].port = socksPort
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
android:layout_toLeftOf="@id/switch_per_app_proxy"
|
android:layout_toLeftOf="@id/switch_per_app_proxy"
|
||||||
android:layout_toStartOf="@id/switch_per_app_proxy"
|
android:layout_toStartOf="@id/switch_per_app_proxy"
|
||||||
android:text="@string/title_pref_per_app_proxy"
|
android:text="@string/title_pref_per_app_proxy"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
android:layout_toLeftOf="@id/switch_bypass_apps"
|
android:layout_toLeftOf="@id/switch_bypass_apps"
|
||||||
android:layout_toStartOf="@id/switch_bypass_apps"
|
android:layout_toStartOf="@id/switch_bypass_apps"
|
||||||
android:text="@string/switch_bypass_apps_mode"
|
android:text="@string/switch_bypass_apps_mode"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -8,25 +8,41 @@
|
|||||||
android:id="@+id/icon"
|
android:id="@+id/icon"
|
||||||
android:layout_width="46dp"
|
android:layout_width="46dp"
|
||||||
android:layout_height="46dp"
|
android:layout_height="46dp"
|
||||||
android:paddingEnd="10dp"
|
android:paddingStart="14dp"
|
||||||
android:paddingLeft="14dp"
|
android:paddingLeft="14dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingEnd="10dp"
|
||||||
android:paddingStart="14dp" />
|
android:paddingRight="10dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="46dp"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="@dimen/layout_margin_right_height"
|
||||||
|
android:paddingEnd="@dimen/layout_margin_right_height">
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatTextView
|
||||||
|
android:id="@+id/package_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.0" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatCheckBox
|
<android.support.v7.widget.AppCompatCheckBox
|
||||||
android:id="@+id/check_box"
|
android:id="@+id/check_box"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingEnd="6dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingLeft="2dp"
|
android:paddingLeft="2dp"
|
||||||
android:paddingRight="6dp"
|
android:paddingEnd="6dp"
|
||||||
android:paddingStart="2dp" />
|
android:paddingRight="6dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<string name="server_lab_content">内容</string>
|
<string name="server_lab_content">内容</string>
|
||||||
<string name="toast_none_data_clipboard">剪贴板中没有数据</string>
|
<string name="toast_none_data_clipboard">剪贴板中没有数据</string>
|
||||||
<string name="toast_invalid_url">无效的网址</string>
|
<string name="toast_invalid_url">无效的网址</string>
|
||||||
<string name="server_lab_need_inbound">确保inbound有socks代理端口10808</string>
|
<string name="server_lab_need_inbound">确保inbound有socks=10808,http=10809</string>
|
||||||
|
|
||||||
<!-- PerAppProxyActivity -->
|
<!-- PerAppProxyActivity -->
|
||||||
<string name="msg_dialog_progress">正在加载</string>
|
<string name="msg_dialog_progress">正在加载</string>
|
||||||
@@ -112,8 +112,8 @@
|
|||||||
<string name="title_pref_socks_port">SOCKS5代理端口</string>
|
<string name="title_pref_socks_port">SOCKS5代理端口</string>
|
||||||
<string name="summary_pref_socks_port">SOCKS5代理端口</string>
|
<string name="summary_pref_socks_port">SOCKS5代理端口</string>
|
||||||
|
|
||||||
<string name="title_pref_lanconn_port">HTTP代理端口(0=不允许)</string>
|
<string name="title_pref_http_port">HTTP代理端口</string>
|
||||||
<string name="summary_pref_lanconn_port">HTTP代理端口</string>
|
<string name="summary_pref_http_port">HTTP代理端口</string>
|
||||||
|
|
||||||
<string name="title_pref_feedback">反馈</string>
|
<string name="title_pref_feedback">反馈</string>
|
||||||
<string name="summary_pref_feedback">反馈改进或漏洞至 GitHub</string>
|
<string name="summary_pref_feedback">反馈改进或漏洞至 GitHub</string>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
<string name="server_lab_content">內容</string>
|
<string name="server_lab_content">內容</string>
|
||||||
<string name="toast_none_data_clipboard">剪貼簿內無資料</string>
|
<string name="toast_none_data_clipboard">剪貼簿內無資料</string>
|
||||||
<string name="toast_invalid_url">網址無效</string>
|
<string name="toast_invalid_url">網址無效</string>
|
||||||
<string name="server_lab_need_inbound">確保inbound有socks代理端口10808</string>
|
<string name="server_lab_need_inbound">確保inbound有socks=10808,http=10809</string>
|
||||||
|
|
||||||
<!-- PerAppProxyActivity -->
|
<!-- PerAppProxyActivity -->
|
||||||
<string name="msg_dialog_progress">載入</string>
|
<string name="msg_dialog_progress">載入</string>
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
<string name="title_pref_socks_port">SOCKS5代理端口</string>
|
<string name="title_pref_socks_port">SOCKS5代理端口</string>
|
||||||
<string name="summary_pref_socks_port">SOCKS5代理端口</string>
|
<string name="summary_pref_socks_port">SOCKS5代理端口</string>
|
||||||
|
|
||||||
<string name="title_pref_lanconn_port">HTTP代理端口(0=不允許)</string>
|
<string name="title_pref_http_port">HTTP代理端口</string>
|
||||||
<string name="summary_pref_lanconn_port">HTTP代理端口</string>
|
<string name="summary_pref_http_port">HTTP代理端口</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="title_pref_feedback">回饋</string>
|
<string name="title_pref_feedback">回饋</string>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
<string name="server_lab_content">Content</string>
|
<string name="server_lab_content">Content</string>
|
||||||
<string name="toast_none_data_clipboard">There is no data in the clipboard</string>
|
<string name="toast_none_data_clipboard">There is no data in the clipboard</string>
|
||||||
<string name="toast_invalid_url">Invalid URL</string>
|
<string name="toast_invalid_url">Invalid URL</string>
|
||||||
<string name="server_lab_need_inbound">Ensure inbound has socks proxy port 10808</string>
|
<string name="server_lab_need_inbound">Ensure inbound has socks=10808,http=10809</string>
|
||||||
|
|
||||||
<!-- PerAppProxyActivity -->
|
<!-- PerAppProxyActivity -->
|
||||||
<string name="msg_dialog_progress">Loading</string>
|
<string name="msg_dialog_progress">Loading</string>
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
<string name="title_pref_socks_port">SOCKS5 proxy port</string>
|
<string name="title_pref_socks_port">SOCKS5 proxy port</string>
|
||||||
<string name="summary_pref_socks_port">SOCKS5 proxy port</string>
|
<string name="summary_pref_socks_port">SOCKS5 proxy port</string>
|
||||||
|
|
||||||
<string name="title_pref_lanconn_port">HTTP proxy port(0=not allowed)</string>
|
<string name="title_pref_http_port">HTTP proxy port</string>
|
||||||
<string name="summary_pref_lanconn_port">HTTP proxy port</string>
|
<string name="summary_pref_http_port">HTTP proxy port</string>
|
||||||
|
|
||||||
<string name="title_pref_feedback">Feedback</string>
|
<string name="title_pref_feedback">Feedback</string>
|
||||||
<string name="summary_pref_feedback">Feedback enhancements or bugs to GitHub</string>
|
<string name="summary_pref_feedback">Feedback enhancements or bugs to GitHub</string>
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<PreferenceCategory android:title="@string/title_settings">
|
<PreferenceCategory android:title="@string/title_settings">
|
||||||
<!--<CheckBoxPreference-->
|
|
||||||
<!--android:key="pref_bypass_mainland"-->
|
|
||||||
<!--android:summary="@string/summary_pref_bypass_mainland"-->
|
|
||||||
<!--android:title="@string/title_pref_bypass_mainland" />-->
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="pref_per_app_proxy"
|
android:key="pref_per_app_proxy"
|
||||||
android:summary="@string/summary_pref_per_app_proxy"
|
android:summary="@string/summary_pref_per_app_proxy"
|
||||||
@@ -28,45 +24,6 @@
|
|||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/title_advanced">
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="pref_forward_ipv6"
|
|
||||||
android:summary="@string/summary_pref_forward_ipv6"
|
|
||||||
android:title="@string/title_pref_forward_ipv6" />
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="pref_local_dns_enabled"
|
|
||||||
android:summary="@string/summary_pref_local_dns_enabled"
|
|
||||||
android:title="@string/title_pref_local_dns_enabled" />
|
|
||||||
|
|
||||||
<EditTextPreference
|
|
||||||
android:key="pref_domestic_dns"
|
|
||||||
android:summary="@string/summary_pref_domestic_dns"
|
|
||||||
android:title="@string/title_pref_domestic_dns" />
|
|
||||||
|
|
||||||
<EditTextPreference
|
|
||||||
android:key="pref_remote_dns"
|
|
||||||
android:summary="@string/summary_pref_remote_dns"
|
|
||||||
android:title="@string/title_pref_remote_dns" />
|
|
||||||
|
|
||||||
|
|
||||||
<!--<EditTextPreference-->
|
|
||||||
<!--android:enabled="false"-->
|
|
||||||
<!--android:defaultValue="10808"-->
|
|
||||||
<!--android:key="pref_socks_port"-->
|
|
||||||
<!--android:summary="@string/summary_pref_socks_port"-->
|
|
||||||
<!--android:title="@string/title_pref_socks_port" />-->
|
|
||||||
|
|
||||||
<!--<EditTextPreference-->
|
|
||||||
<!--android:defaultValue="0"-->
|
|
||||||
<!--android:key="pref_lanconn_port"-->
|
|
||||||
<!--android:summary="@string/summary_pref_lanconn_port"-->
|
|
||||||
<!--android:title="@string/title_pref_lanconn_port" />-->
|
|
||||||
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/title_pref_routing">
|
<PreferenceCategory android:title="@string/title_pref_routing">
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="IPIfNonMatch"
|
android:defaultValue="IPIfNonMatch"
|
||||||
@@ -88,15 +45,47 @@
|
|||||||
android:key="pref_routing_custom"
|
android:key="pref_routing_custom"
|
||||||
android:summary="@string/title_pref_routing_custom"
|
android:summary="@string/title_pref_routing_custom"
|
||||||
android:title="@string/title_pref_routing_custom" />
|
android:title="@string/title_pref_routing_custom" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory android:title="@string/title_advanced">
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="pref_forward_ipv6"
|
||||||
|
android:summary="@string/summary_pref_forward_ipv6"
|
||||||
|
android:title="@string/title_pref_forward_ipv6" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="pref_local_dns_enabled"
|
||||||
|
android:summary="@string/summary_pref_local_dns_enabled"
|
||||||
|
android:title="@string/title_pref_local_dns_enabled" />
|
||||||
|
|
||||||
|
<EditTextPreference
|
||||||
|
android:key="pref_domestic_dns"
|
||||||
|
android:summary="@string/summary_pref_domestic_dns"
|
||||||
|
android:title="@string/title_pref_domestic_dns" />
|
||||||
|
|
||||||
|
<EditTextPreference
|
||||||
|
android:key="pref_remote_dns"
|
||||||
|
android:summary="@string/summary_pref_remote_dns"
|
||||||
|
android:title="@string/title_pref_remote_dns" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="pref_socks_port"
|
||||||
|
android:summary="10808"
|
||||||
|
android:title="@string/title_pref_socks_port" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="pref_http_port"
|
||||||
|
android:summary="10809"
|
||||||
|
android:title="@string/title_pref_http_port" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory android:title="@string/title_about">
|
||||||
<!--<Preference-->
|
<!--<Preference-->
|
||||||
<!--android:key="pref_donate"-->
|
<!--android:key="pref_donate"-->
|
||||||
<!--android:summary="@string/summary_pref_donate"-->
|
<!--android:summary="@string/summary_pref_donate"-->
|
||||||
<!--android:title="@string/title_pref_donate" />-->
|
<!--android:title="@string/title_pref_donate" />-->
|
||||||
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/title_about">
|
|
||||||
<!--<Preference-->
|
<!--<Preference-->
|
||||||
<!--android:key="pref_licenses"-->
|
<!--android:key="pref_licenses"-->
|
||||||
<!--android:title="@string/notices_title" />-->
|
<!--android:title="@string/notices_title" />-->
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
buildToolsVersion '27.0.3'
|
buildToolsVersion '28.0.3'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 17
|
minSdkVersion 17
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
#Fri Jun 02 14:08:42 CST 2017
|
#Fri Jun 02 14:08:42 CST 2017
|
||||||
ankoVersion=0.10.8
|
ankoVersion=0.10.8
|
||||||
kotlinVersion=1.3.10
|
kotlinVersion=1.3.40
|
||||||
supportLibVersion=27.1.1
|
supportLibVersion=28.0.0
|
||||||
buildToolsVer=27.0.3
|
buildToolsVer=28.0.3
|
||||||
compileSdkVer=27
|
compileSdkVer=28
|
||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
targetSdkVer=27
|
targetSdkVer=28
|
||||||
|
|||||||
Reference in New Issue
Block a user