Compare commits

...

2 Commits

Author SHA1 Message Date
2dust 879e25bb82 sdk28 2019-07-10 14:24:09 +08:00
2dust c0e968ac34 up ver 2019-07-01 13:22:48 +08:00
14 changed files with 94 additions and 91 deletions
+5 -5
View File
@@ -3,8 +3,8 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileOptions {
targetCompatibility = "8"
@@ -16,8 +16,8 @@ android {
minSdkVersion 17
targetSdkVersion Integer.parseInt("$targetSdkVer")
multiDexEnabled true
versionCode 206
versionName "0.6.21"
versionCode 212
versionName "1.0.2"
}
signingConfigs {
@@ -96,7 +96,7 @@ dependencies {
implementation "org.jetbrains.anko:anko-support-v4:$ankoVersion"
implementation "org.jetbrains.anko:anko-appcompat-v7:$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:rxandroid:1.2.1'
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
+1 -1
View File
@@ -9,7 +9,7 @@
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
<uses-permission android:name="android.permission.CAMERA" />
<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" /> -->
<application
android:name=".AngApplication"
@@ -98,7 +98,7 @@ class PerAppProxyActivity : BaseActivity() {
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener() {
var dst = 0
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
if (dst > threshold) {
header_view.hide()
@@ -62,6 +62,7 @@ class PerAppProxyAdapter(val activity: BaseActivity, val apps: List<AppInfo>, bl
val icon = itemView.icon!!
val name = itemView.name!!
val package_name = itemView.package_name!!
val checkBox = itemView.check_box!!
fun bind(appInfo: AppInfo) {
@@ -71,10 +72,7 @@ class PerAppProxyAdapter(val activity: BaseActivity, val apps: List<AppInfo>, bl
// name.text = appInfo.appName
checkBox.isChecked = inBlacklist
// name.textColor = mActivity.resources.getColor(if (appInfo.isSystemApp)
// R.color.color_highlight_material else R.color.abc_secondary_text_material_light)
package_name.text = appInfo.packageName
if (appInfo.isSystemApp) {
name.text = String.format("** %1s", appInfo.appName)
name.textColor = Color.RED
@@ -34,7 +34,7 @@ class SettingsActivity : BaseActivity() {
const val PREF_DOMESTIC_DNS = "pref_domestic_dns"
// 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_MODE = "pref_routing_mode"
@@ -67,7 +67,7 @@ class SettingsActivity : BaseActivity() {
val forwardIpv6 by lazy { findPreference(PREF_FORWARD_IPV6) as CheckBoxPreference }
// 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 donate: Preference by lazy { findPreference(PREF_DONATE) }
@@ -132,8 +132,8 @@ class SettingsActivity : BaseActivity() {
// socksPort.summary = any as String
// true
// }
// lanconnPort.setOnPreferenceChangeListener { preference, any ->
// lanconnPort.summary = any as String
// httpPort.setOnPreferenceChangeListener { preference, any ->
// httpPort.summary = any as String
// true
// }
@@ -156,7 +156,7 @@ class SettingsActivity : BaseActivity() {
}
// 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)
}
@@ -131,7 +131,7 @@ object V2rayConfigUtil {
try {
v2rayConfig.inbounds[0].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) {
// v2rayConfig.inbounds[0].port = socksPort
@@ -54,7 +54,7 @@
android:layout_toLeftOf="@id/switch_per_app_proxy"
android:layout_toStartOf="@id/switch_per_app_proxy"
android:text="@string/title_pref_per_app_proxy"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</RelativeLayout>
@@ -81,7 +81,7 @@
android:layout_toLeftOf="@id/switch_bypass_apps"
android:layout_toStartOf="@id/switch_bypass_apps"
android:text="@string/switch_bypass_apps_mode"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</RelativeLayout>
@@ -8,25 +8,41 @@
android:id="@+id/icon"
android:layout_width="46dp"
android:layout_height="46dp"
android:paddingEnd="10dp"
android:paddingStart="14dp"
android:paddingLeft="14dp"
android:paddingRight="10dp"
android:paddingStart="14dp" />
android:paddingEnd="10dp"
android:paddingRight="10dp" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/name"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0" />
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:id="@+id/name"
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:textAppearance="@style/TextAppearance.AppCompat.Small" />
</LinearLayout>
<android.support.v7.widget.AppCompatCheckBox
android:id="@+id/check_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:paddingEnd="6dp"
android:paddingStart="2dp"
android:paddingLeft="2dp"
android:paddingRight="6dp"
android:paddingStart="2dp" />
android:paddingEnd="6dp"
android:paddingRight="6dp" />
</LinearLayout>
@@ -61,7 +61,7 @@
<string name="server_lab_content">内容</string>
<string name="toast_none_data_clipboard">剪贴板中没有数据</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 -->
<string name="msg_dialog_progress">正在加载</string>
@@ -112,8 +112,8 @@
<string name="title_pref_socks_port">SOCKS5代理端口</string>
<string name="summary_pref_socks_port">SOCKS5代理端口</string>
<string name="title_pref_lanconn_port">HTTP代理端口(0=不允许)</string>
<string name="summary_pref_lanconn_port">HTTP代理端口</string>
<string name="title_pref_http_port">HTTP代理端口</string>
<string name="summary_pref_http_port">HTTP代理端口</string>
<string name="title_pref_feedback">反馈</string>
<string name="summary_pref_feedback">反馈改进或漏洞至 GitHub</string>
@@ -61,7 +61,7 @@
<string name="server_lab_content">內容</string>
<string name="toast_none_data_clipboard">剪貼簿內無資料</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 -->
<string name="msg_dialog_progress">載入</string>
@@ -113,8 +113,8 @@
<string name="title_pref_socks_port">SOCKS5代理端口</string>
<string name="summary_pref_socks_port">SOCKS5代理端口</string>
<string name="title_pref_lanconn_port">HTTP代理端口(0=不允許)</string>
<string name="summary_pref_lanconn_port">HTTP代理端口</string>
<string name="title_pref_http_port">HTTP代理端口</string>
<string name="summary_pref_http_port">HTTP代理端口</string>
<string name="title_pref_feedback">回饋</string>
+3 -3
View File
@@ -61,7 +61,7 @@
<string name="server_lab_content">Content</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="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 -->
<string name="msg_dialog_progress">Loading</string>
@@ -113,8 +113,8 @@
<string name="title_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="summary_pref_lanconn_port">HTTP proxy port</string>
<string name="title_pref_http_port">HTTP proxy port</string>
<string name="summary_pref_http_port">HTTP proxy port</string>
<string name="title_pref_feedback">Feedback</string>
<string name="summary_pref_feedback">Feedback enhancements or bugs to GitHub</string>
+35 -46
View File
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<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
android:key="pref_per_app_proxy"
android:summary="@string/summary_pref_per_app_proxy"
@@ -28,45 +24,6 @@
</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">
<ListPreference
android:defaultValue="IPIfNonMatch"
@@ -88,15 +45,47 @@
android:key="pref_routing_custom"
android:summary="@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-->
<!--android:key="pref_donate"-->
<!--android:summary="@string/summary_pref_donate"-->
<!--android:title="@string/title_pref_donate" />-->
</PreferenceCategory>
<PreferenceCategory android:title="@string/title_about">
<!--<Preference-->
<!--android:key="pref_licenses"-->
<!--android:title="@string/notices_title" />-->
+2 -2
View File
@@ -1,8 +1,8 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 17
+5 -5
View File
@@ -14,9 +14,9 @@
# org.gradle.parallel=true
#Fri Jun 02 14:08:42 CST 2017
ankoVersion=0.10.8
kotlinVersion=1.3.10
supportLibVersion=27.1.1
buildToolsVer=27.0.3
compileSdkVer=27
kotlinVersion=1.3.40
supportLibVersion=28.0.0
buildToolsVer=28.0.3
compileSdkVer=28
kotlin.incremental=true
targetSdkVer=27
targetSdkVer=28