Skip to content

Commit 48d0223

Browse files
author
xz633@qq.com
committed
Initial commit
0 parents  commit 48d0223

File tree

494 files changed

+72200
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

494 files changed

+72200
-0
lines changed

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/app.iml

Lines changed: 179 additions & 0 deletions
Large diffs are not rendered by default.

app/build.gradle

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'android-apt'
3+
4+
android {
5+
compileSdkVersion 24
6+
buildToolsVersion '24.0.3'
7+
dataBinding {
8+
enabled = true
9+
}
10+
defaultConfig {
11+
applicationId "cn.darkal.networkdiagnosis"
12+
minSdkVersion 14
13+
targetSdkVersion 22
14+
versionCode 15
15+
versionName "2.4.15"
16+
// Enabling multidex support.
17+
multiDexEnabled true
18+
resConfigs "zh"
19+
// signingConfig signingConfigs.NetworkDiagnosis
20+
}
21+
buildTypes {
22+
release {
23+
minifyEnabled true
24+
shrinkResources true
25+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
26+
// signingConfig signingConfigs.NetworkDiagnosis
27+
}
28+
debug {
29+
// signingConfig signingConfigs.NetworkDiagnosis
30+
}
31+
}
32+
packagingOptions {
33+
exclude 'META-INF/DEPENDENCIES'
34+
exclude 'META-INF/NOTICE'
35+
exclude 'META-INF/LICENSE'
36+
exclude 'META-INF/LICENSE.txt'
37+
exclude 'META-INF/NOTICE.txt'
38+
exclude 'META-INF/BCKEY.DSA'
39+
exclude 'META-INF/BCKEY.SF'
40+
exclude 'META-INF/LICENSE.uas.txt'
41+
}
42+
useLibrary 'org.apache.http.legacy'
43+
compileOptions {
44+
sourceCompatibility JavaVersion.VERSION_1_7
45+
targetCompatibility JavaVersion.VERSION_1_7
46+
}
47+
productFlavors {
48+
}
49+
}
50+
51+
dependencies {
52+
compile fileTree(include: ['*.jar'], dir: 'libs')
53+
testCompile 'junit:junit:4.12'
54+
apt 'com.jakewharton:butterknife-compiler:8.2.1'
55+
compile 'com.jakewharton:butterknife:8.2.1'
56+
compile 'com.squareup.okhttp3:okhttp:3.4.1'
57+
compile 'com.android.support:appcompat-v7:24.2.1'
58+
compile 'com.android.support:design:24.2.1'
59+
compile 'com.android.support:support-v4:24.2.1'
60+
compile 'com.android.support:gridlayout-v7:24.2.1'
61+
// compile 'com.android.support:cardview-v7:24.0.0'
62+
compile 'com.android.support:support-annotations:24.2.1'
63+
compile 'com.android.support:multidex:1.0.1'
64+
// littleproxy及其依赖
65+
compile('net.lightbody.bmp:littleproxy:1.1.0-beta-bmp-13') {
66+
exclude group: 'io.netty'
67+
}
68+
compile 'net.sf.qualitycheck:quality-check:1.3'
69+
compile 'javax.annotation:jsr250-api:1.0'
70+
compile 'com.fasterxml.jackson.core:jackson-core:2.7.6'
71+
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.6'
72+
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.6'
73+
compile 'org.bouncycastle:bcprov-jdk15on:1.54'
74+
compile 'org.bouncycastle:bcpkix-jdk15on:1.54'
75+
compile 'dnsjava:dnsjava:2.1.7'
76+
compile 'com.google.guava:guava:19.0'
77+
compile 'com.google.code.findbugs:jsr305:3.0.1'
78+
compile 'com.google.jimfs:jimfs:1.1'
79+
compile 'com.jcraft:jzlib:1.1.3'
80+
// 日志处理
81+
compile 'org.slf4j:slf4j-api:1.7.21'
82+
// compile 'org.slf4j:jcl-over-slf4j:1.7.21'
83+
84+
// 启用Netty的日志输出(调试用)
85+
86+
// compile 'com.noveogroup.android:android-logger:1.3.5'
87+
88+
// 文件上传插件
89+
compile 'net.gotev:uploadservice:3.0.3'
90+
// Bugly上报
91+
compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
92+
// compile 'com.tencent.bugly:nativecrashreport:latest.release'
93+
// 图片显示
94+
compile 'com.github.bumptech.glide:glide:3.7.0'
95+
compile 'com.github.clans:fab:1.6.4'
96+
97+
// Json格式化
98+
compile 'com.google.code.gson:gson:2.7'
99+
}
490 KB
Binary file not shown.

app/libs/netty-android.jar

2.14 MB
Binary file not shown.

app/libs/zxing.jar

526 KB
Binary file not shown.

app/proguard-rules.pro

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/Darkal/Documents/Android/android-sdk-macosx/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
-dontskipnonpubliclibraryclasses # 不忽略非公共的库类
19+
-optimizationpasses 5 # 指定代码的压缩级别
20+
-dontusemixedcaseclassnames # 是否使用大小写混合
21+
-dontpreverify # 混淆时是否做预校验
22+
-verbose # 混淆时是否记录日志
23+
-keepattributes *Annotation* # 保持注解
24+
-ignorewarning # 忽略警告
25+
-dontoptimize # 优化不优化输入的类文件
26+
27+
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* # 混淆时所采用的算法
28+
29+
#保持哪些类不被混淆
30+
-keep public class * extends android.app.Activity
31+
-keep public class * extends android.app.Application
32+
-keep public class * extends android.app.Service
33+
-keep public class * extends android.content.BroadcastReceiver
34+
-keep public class * extends android.content.ContentProvider
35+
-keep public class * extends android.app.backup.BackupAgentHelper
36+
-keep public class * extends android.preference.Preference
37+
-keep public class com.android.vending.licensing.ILicensingService
38+
39+
# Preserve Android support libraries` classes and interfaces
40+
-keep class android.support.** { *; }
41+
-keep interface android.support.** { *; }
42+
-keep public class * extends android.support.annotation.**
43+
44+
#生成日志数据,gradle build时在本项目根目录输出
45+
-dump class_files.txt #apk包内所有class的内部结构
46+
-printseeds seeds.txt #未混淆的类和成员
47+
-printusage unused.txt #打印未被使用的代码
48+
-printmapping mapping.txt #混淆前后的映射
49+
50+
-keep class net.lightbody.bmp.** {*;}
51+
-keep class com.netease.** {*;}
52+
53+
-keep public class * extends android.support.** #如果有引用v4或者v7包,需添加
54+
#-libraryjars libs/netty-android.jar #混淆第三方jar包,其中xxx为jar包名
55+
#-keep class com.xxx.**{*;} #不混淆某个包内的所有文件
56+
#-dontwarn com.xxx** #忽略某个包的警告
57+
-keepattributes Signature #不混淆泛型
58+
-keepnames class * implements java.io.Serializable #不混淆Serializable
59+
60+
-keepclassmembers class **.R$* { #不混淆资源类
61+
  public static <fields>;
62+
}
63+
-keepclasseswithmembernames class * { # 保持 native 方法不被混淆
64+
native <methods>;
65+
}
66+
-keepclasseswithmembers class * { # 保持自定义控件类不被混淆
67+
public <init>(android.content.Context, android.util.AttributeSet);
68+
}
69+
-keepclasseswithmembers class * { # 保持自定义控件类不被混淆
70+
public <init>(android.content.Context, android.util.AttributeSet, int);
71+
}
72+
-keepclassmembers class * extends android.app.Activity { # 保持自定义控件类不被混淆
73+
public void *(android.view.View);
74+
}
75+
-keepclassmembers enum * { # 保持枚举 enum 类不被混淆
76+
public static **[] values();
77+
public static ** valueOf(java.lang.String);
78+
}
79+
-keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
80+
public static final android.os.Parcelable$Creator *;
81+
}
82+
83+
84+
# Bugly
85+
-dontwarn com.tencent.bugly.**
86+
-keep class com.tencent.bugly.** {*;}
87+
88+
# ButterKnife
89+
-keep class butterknife.** { *; }
90+
-dontwarn butterknife.internal.**
91+
-keep class **$$ViewBinder { *; }
92+
-keepclasseswithmembernames class * {
93+
@butterknife.* <fields>;
94+
}
95+
-keepclasseswithmembernames class * {
96+
@butterknife.* <methods>;
97+
}
98+
99+
# Glide
100+
-keep public class * implements com.bumptech.glide.module.GlideModule
101+
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
102+
**[] $VALUES;
103+
public *;
104+
}
105+
106+
# Jackson
107+
-dontwarn org.codehaus.jackson.**
108+
-dontwarn com.fasterxml.jackson.databind.**
109+
-keep class org.codehaus.jackson.** { *;}
110+
-keep class com.fasterxml.jackson.** { *; }
111+
112+
113+
# OkHttp3
114+
-dontwarn com.squareup.okhttp3.**
115+
-keep class com.squareup.okhttp3.** { *;}
116+
-dontwarn okio.**
117+
118+
##---------------Begin: proguard configuration for Gson ----------
119+
# Gson uses generic type information stored in a class file when working with fields. Proguard
120+
# removes such information by default, so configure it to keep all of it.
121+
-keepattributes Signature
122+
123+
# For using GSON @Expose annotation
124+
-keepattributes *Annotation*
125+
126+
# Gson specific classes
127+
-keep class sun.misc.Unsafe { *; }
128+
#-keep class com.google.gson.stream.** { *; }
129+
130+
# Application classes that will be serialized/deserialized over Gson
131+
#-keep class com.google.gson.examples.android.model.** { *; }
132+
133+
# Prevent proguard from stripping interface information from TypeAdapterFactory,
134+
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
135+
-keep class * implements com.google.gson.TypeAdapterFactory
136+
-keep class * implements com.google.gson.JsonSerializer
137+
-keep class * implements com.google.gson.JsonDeserializer
138+
139+
##---------------End: proguard configuration for Gson ----------
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package cn.darkal.networkdiagnosis;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}

app/src/main/AndroidManifest.xml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="cn.darkal.networkdiagnosis">
4+
5+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
8+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9+
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
10+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
11+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
12+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
13+
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
14+
<uses-permission android:name="android.permission.VIBRATE" />
15+
<uses-permission android:name="android.permission.CAMERA" />
16+
<uses-permission android:name="android.permission.FLASHLIGHT" />
17+
<uses-permission android:name="android.permission.READ_LOGS" />
18+
19+
<application
20+
android:name="cn.darkal.networkdiagnosis.SysApplication"
21+
android:allowBackup="true"
22+
android:icon="@mipmap/ic_launcher"
23+
android:label="@string/app_name"
24+
android:supportsRtl="true"
25+
android:largeHeap="true"
26+
android:theme="@style/AppTheme">
27+
28+
<activity
29+
android:name="cn.darkal.networkdiagnosis.Activity.MainActivity"
30+
android:configChanges="orientation|keyboardHidden"
31+
android:label="@string/app_name"
32+
android:launchMode="singleTask"
33+
android:theme="@style/AppTheme.NoActionBar"
34+
android:screenOrientation="portrait"
35+
android:windowSoftInputMode="stateHidden">
36+
<meta-data android:name="android.app.searchable"
37+
android:resource="@xml/searchable" />
38+
<intent-filter>
39+
<action android:name="android.intent.action.VIEW" />
40+
41+
<category android:name="android.intent.category.DEFAULT" />
42+
<category android:name="android.intent.category.BROWSABLE" />
43+
44+
<data
45+
android:host="webview"
46+
android:scheme="jdhttpmonitor" />
47+
</intent-filter>
48+
<intent-filter>
49+
<action android:name="android.intent.action.MAIN" />
50+
51+
<category android:name="android.intent.category.LAUNCHER" />
52+
</intent-filter>
53+
<intent-filter>
54+
<action android:name="android.intent.action.SEARCH" />
55+
</intent-filter>
56+
</activity>
57+
<activity
58+
android:name="com.google.zxing.QrCodeScanActivity"
59+
android:screenOrientation="portrait" />
60+
61+
<service
62+
android:name="cn.darkal.networkdiagnosis.MyVpnService"
63+
android:permission="android.permission.BIND_VPN_SERVICE">
64+
<intent-filter>
65+
<action android:name="android.net.VpnService" />
66+
</intent-filter>
67+
</service>
68+
69+
<activity
70+
android:name="cn.darkal.networkdiagnosis.Activity.SettingsActivity"
71+
android:label="@string/title_activity_settings" />
72+
73+
<!-- 引用xml策略声明 -->
74+
<receiver
75+
android:name="cn.darkal.networkdiagnosis.Receiver.MyAdminReceiver"
76+
android:description="@string/app_name"
77+
android:label="@string/app_name"
78+
android:permission="android.permission.BIND_DEVICE_ADMIN">
79+
<meta-data
80+
android:name="android.app.device_admin"
81+
android:resource="@xml/admin" />
82+
83+
<intent-filter>
84+
<action android:name="android.app.action.PROFILE_PROVISIONING_COMPLETE" />
85+
</intent-filter>
86+
</receiver>
87+
88+
<activity
89+
android:name="cn.darkal.networkdiagnosis.Activity.HarDetailActivity"
90+
android:theme="@style/AppTheme.NoActionBar"/>
91+
92+
<activity
93+
android:name="cn.darkal.networkdiagnosis.Activity.JsonPreviewActivity"
94+
android:theme="@style/AppTheme.NoActionBar"/>
95+
96+
<activity
97+
android:name="com.tencent.bugly.beta.ui.BetaActivity"
98+
android:theme="@android:style/Theme.Translucent" />
99+
</application>
100+
101+
</manifest>

0 commit comments

Comments
 (0)