GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add:添加deflate加密方式的解码(修复mp.weixin.qq.com无法查看内容的bug) · newrain7803/AndroidHttpCapture@756d007

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app
    • build.gradle
    • src/main
      • AndroidManifest.xml
      • java
        • cn/darkal/networkdiagnosis
          • Activity
            • HarDetailActivity.java
            • JsonPreviewActivity.java
          • Utils
            • FileUtil.java
        • net/lightbody/bmp
          • BrowserMobProxy.java
          • BrowserMobProxyServer.java
          • client
            • ClientUtil.java
          • core
            • har
              • Har.java
              • HarCache.java
              • HarCacheStatus.java
              • HarContent.java
              • HarCookie.java
              • HarEntry.java
              • HarLog.java
              • HarNameValuePair.java
              • HarNameVersion.java
              • HarPage.java
              • HarPageTimings.java
              • HarPostData.java
              • HarPostDataParam.java
              • HarRequest.java
              • HarResponse.java
              • HarTimings.java
            • json
              • ISO8601DateFormatter.java
              • ISO8601WithTDZDateFormatter.java
          • exception
            • DecompressionException.java
            • UnsupportedCharsetException.java
          • filters
            • AddHeadersFilter.java
            • AutoBasicAuthFilter.java
            • BlacklistFilter.java
            • BrowserMobHttpFilterChain.java
            • ClientRequestCaptureFilter.java
            • HarCaptureFilter.java
            • HttpConnectHarCaptureFilter.java
            • HttpsAwareFiltersAdapter.java
            • HttpsHostCaptureFilter.java
            • HttpsOriginalHostCaptureFilter.java
            • LatencyFilter.java
            • ModifiedRequestAwareFilter.java
            • RegisterRequestFilter.java
            • RequestFilter.java
            • RequestFilterAdapter.java
            • ResolvedHostnameCacheFilter.java
            • ResponseFilter.java
            • ResponseFilterAdapter.java
            • RewriteUrlFilter.java
            • ServerResponseCaptureFilter.java
            • UnregisterRequestFilter.java
            • WhitelistFilter.java
            • support
              • HttpConnectTiming.java
            • util
              • HarCaptureUtil.java
          • mitm
            • CertificateAndKey.java
            • CertificateAndKeySource.java
            • CertificateInfo.java
            • CertificateInfoGenerator.java
            • ExistingCertificateSource.java
            • HostnameCertificateInfoGenerator.java
            • KeyStoreCertificateSource.java
            • KeyStoreFileCertificateSource.java
            • PemFileCertificateSource.java
            • RootCertificateGenerator.java
            • TrustSource.java
            • exception
              • CertificateCreationException.java
              • CertificateSourceException.java
              • ExportException.java
              • ImportException.java
              • KeyGeneratorException.java
              • KeyStoreAccessException.java
              • MitmException.java
              • SslContextInitializationException.java
              • TrustSourceException.java
              • UncheckedIOException.java
            • keys
              • ECKeyGenerator.java
              • KeyGenerator.java
              • RSAKeyGenerator.java
            • manager
              • ImpersonatingMitmManager.java
            • stats
              • CertificateGenerationStatistics.java
            • tools
              • BouncyCastleSecurityProviderTool.java
              • DefaultSecurityProviderTool.java
              • SecurityProviderTool.java
            • trustmanager
              • InsecureExtendedTrustManager.java
              • InsecureTrustManagerFactory.java
            • util
              • EncryptionUtil.java
              • KeyStoreUtil.java
              • MitmConstants.java
              • SslUtil.java
              • TrustUtil.java
          • proxy
            • ActivityMonitor.java
            • BlacklistEntry.java
            • CaptureType.java
            • RewriteRule.java
            • Whitelist.java
            • auth
              • AuthType.java
            • dns
              • AbstractHostNameRemapper.java
              • AdvancedHostResolver.java
              • BasicHostResolver.java
              • ChainedHostResolver.java
              • DelegatingHostResolver.java
              • DnsJavaResolver.java
              • HostResolver.java
              • NativeCacheManipulatingResolver.java
              • NativeResolver.java
          • util
            • BrowserMobHttpUtil.java
            • BrowserMobProxyUtil.java
            • ClasspathResourceUtil.java
            • HttpMessageContents.java
            • HttpMessageInfo.java
            • HttpObjectUtil.java
            • HttpUtil.java
      • res
        • layout
          • activity_json.xml
          • activity_scrolling.xml
          • nav_header_main.xml
        • values
          • dimens.xml
        • xml
          • network_security_config.xml
  • build.gradle
  • gradle/wrapper
    • gradle-wrapper.properties

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/build.gradle‎

Copy file name to clipboardExpand all lines: app/build.gradle
+38-35Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apply plugin: 'com.android.application'
2-
apply plugin: 'android-apt'
32
apply plugin: 'bugly'
43

54
bugly {
@@ -20,17 +19,17 @@ android {
2019
dexOptions {
2120
javaMaxHeapSize "4g"
2221
}
23-
compileSdkVersion 24
24-
buildToolsVersion '24.0.3'
22+
compileSdkVersion 27
23+
buildToolsVersion '27.0.3'
2524
dataBinding {
2625
enabled = true
2726
}
2827
defaultConfig {
2928
applicationId "cn.darkal.networkdiagnosis"
3029
minSdkVersion 14
31-
targetSdkVersion 22
30+
targetSdkVersion 23
3231
versionCode 30
33-
versionName "3.1.30"
32+
versionName "3.2.31"
3433
// Enabling multidex support.
3534
multiDexEnabled true
3635
resConfigs "zh"
@@ -70,50 +69,54 @@ android {
7069
}
7170

7271
dependencies {
73-
compile fileTree(include: ['*.jar'], dir: 'libs')
74-
testCompile 'junit:junit:4.12'
75-
apt 'com.jakewharton:butterknife-compiler:8.2.1'
76-
compile 'com.jakewharton:butterknife:8.2.1'
77-
compile 'com.squareup.okhttp3:okhttp:3.4.1'
78-
compile 'com.android.support:appcompat-v7:24.2.1'
79-
compile 'com.android.support:design:24.2.1'
80-
compile 'com.android.support:support-v4:24.2.1'
81-
compile 'com.android.support:gridlayout-v7:24.2.1'
72+
implementation fileTree(include: ['*.jar'], dir: 'libs')
73+
testImplementation 'junit:junit:4.12'
74+
implementation 'com.jakewharton:butterknife:8.8.1'
75+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
76+
implementation 'com.android.databinding:library:3.1.3'
77+
implementation 'com.android.databinding:adapters:3.1.3'
78+
implementation 'com.squareup.okhttp3:okhttp:3.4.1'
79+
implementation 'com.android.support:appcompat-v7:27.1.1'
80+
implementation 'com.android.support:design:27.1.1'
81+
implementation 'com.android.support:support-v4:27.1.1'
82+
implementation 'com.android.support:gridlayout-v7:27.1.1'
8283
// compile 'com.android.support:cardview-v7:24.0.0'
83-
compile 'com.android.support:support-annotations:24.2.1'
84-
compile 'com.android.support:multidex:1.0.1'
84+
implementation 'com.android.support:support-annotations:27.1.1'
85+
implementation 'com.android.support:multidex:1.0.3'
8586
// littleproxy及其依赖
86-
compile('net.lightbody.bmp:littleproxy:1.1.0-beta-bmp-16') {
87+
implementation('net.lightbody.bmp:littleproxy:1.1.0-beta-bmp-17') {
8788
exclude group: 'io.netty'
8889
}
90+
implementation 'com.jcraft:jzlib:1.1.3'
8991

90-
compile group: 'org.apache.directory.studio', name: 'org.apache.commons.io', version: '2.4'
91-
compile 'javax.annotation:jsr250-api:1.0'
92-
compile 'com.fasterxml.jackson.core:jackson-core:2.7.6'
93-
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.6'
94-
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.6'
95-
compile 'org.bouncycastle:bcprov-jdk15on:1.54'
96-
compile 'org.bouncycastle:bcpkix-jdk15on:1.54'
97-
compile 'dnsjava:dnsjava:2.1.7'
98-
compile 'com.google.guava:guava:19.0'
99-
compile 'com.google.code.findbugs:jsr305:3.0.1'
100-
compile 'com.google.jimfs:jimfs:1.1'
101-
compile 'com.jcraft:jzlib:1.1.3'
92+
93+
implementation group: 'org.apache.directory.studio', name: 'org.apache.commons.io', version: '2.4'
94+
implementation 'javax.annotation:jsr250-api:1.0'
95+
implementation 'com.fasterxml.jackson.core:jackson-core:2.7.6'
96+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.7.6'
97+
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.7.6'
98+
implementation 'org.bouncycastle:bcprov-jdk15on:1.54'
99+
implementation 'org.bouncycastle:bcpkix-jdk15on:1.54'
100+
implementation 'dnsjava:dnsjava:2.1.7'
101+
implementation 'com.google.guava:guava:19.0'
102+
implementation 'com.google.code.findbugs:jsr305:3.0.1'
103+
implementation 'com.google.jimfs:jimfs:1.1'
104+
implementation 'com.jcraft:jzlib:1.1.3'
102105
// 日志处理
103106
// compile 'org.slf4j:slf4j-api:1.7.21'
104-
compile 'org.slf4j:slf4j-log4j12:1.7.21'
107+
implementation 'org.slf4j:slf4j-log4j12:1.7.21'
105108

106109
// compile 'org.slf4j:jcl-over-slf4j:1.7.21'
107110
// 启用Netty的日志输出(调试用)
108111
// compile 'com.noveogroup.android:android-logger:1.3.5'
109112
// 文件上传插件
110-
compile 'net.gotev:uploadservice:3.0.3'
113+
implementation 'net.gotev:uploadservice:3.0.3'
111114
// Bugly上报
112-
compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
115+
implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
113116
// compile 'com.tencent.bugly:nativecrashreport:latest.release'
114117
// 图片显示
115-
compile 'com.github.bumptech.glide:glide:3.7.0'
116-
compile 'com.github.clans:fab:1.6.4'
118+
implementation 'com.github.bumptech.glide:glide:3.7.0'
119+
implementation 'com.github.clans:fab:1.6.4'
117120
// Json格式化
118-
compile 'com.google.code.gson:gson:2.7'
121+
implementation 'com.google.code.gson:gson:2.7'
119122
}
Collapse file

‎app/src/main/AndroidManifest.xml‎

Copy file name to clipboardExpand all lines: app/src/main/AndroidManifest.xml
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<uses-permission android:name="android.permission.READ_LOGS" />
1818

1919
<application
20+
android:networkSecurityConfig="@xml/network_security_config"
2021
android:name=".SysApplication"
2122
android:allowBackup="true"
2223
android:icon="@mipmap/ic_launcher"
@@ -94,11 +95,9 @@
9495
</receiver>
9596

9697
<activity
97-
android:name=".Activity.HarDetailActivity"
98-
android:theme="@style/AppTheme.NoActionBar" />
98+
android:name=".Activity.HarDetailActivity" />
9999
<activity
100-
android:name=".Activity.JsonPreviewActivity"
101-
android:theme="@style/AppTheme.NoActionBar" />
100+
android:name=".Activity.JsonPreviewActivity" />
102101
<activity
103102
android:name="com.tencent.bugly.beta.ui.BetaActivity"
104103
android:theme="@android:style/Theme.Translucent" />
Collapse file

‎app/src/main/java/cn/darkal/networkdiagnosis/Activity/HarDetailActivity.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/cn/darkal/networkdiagnosis/Activity/HarDetailActivity.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ protected void onCreate(Bundle savedInstanceState) {
4141
setContentView(R.layout.activity_scrolling);
4242
ButterKnife.bind(this);
4343

44-
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
45-
setSupportActionBar(toolbar);
46-
4744
setupActionBar();
4845

4946
try {
Collapse file

‎app/src/main/java/cn/darkal/networkdiagnosis/Activity/JsonPreviewActivity.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/cn/darkal/networkdiagnosis/Activity/JsonPreviewActivity.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ protected void onCreate(Bundle savedInstanceState) {
4545
super.onCreate(savedInstanceState);
4646
setContentView(R.layout.activity_json);
4747
ButterKnife.bind(this);
48-
49-
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
50-
setSupportActionBar(toolbar);
48+
//
49+
// Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
50+
// setSupportActionBar(toolbar);
5151

5252
setupActionBar();
5353

Collapse file

‎app/src/main/java/cn/darkal/networkdiagnosis/Utils/FileUtil.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/cn/darkal/networkdiagnosis/Utils/FileUtil.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ public static File getDataRoot() {
8686
}
8787

8888
/**
89-
* 获取我们京致衣橱存储的目录
89+
*
9090
*/
9191
public static File getAppRoot() {
9292
try {
93-
File root = new File(getDataRoot(), "com.jd.wxsq.app");
93+
File root = new File(getDataRoot(), "com.darkal.nt");
9494
if (!root.exists()) {
9595
root.mkdirs();
9696
}
Collapse file

‎app/src/main/java/net/lightbody/bmp/BrowserMobProxy.java‎

Copy file name to clipboard
100755100644
Expand all lines: app/src/main/java/net/lightbody/bmp/BrowserMobProxy.java
File mode changed.
Collapse file

‎app/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java‎

Copy file name to clipboard
100755100644
Expand all lines: app/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
import org.slf4j.Logger;
6464
import org.slf4j.LoggerFactory;
6565

66-
import java.io.File;
6766
import java.net.InetAddress;
6867
import java.net.InetSocketAddress;
6968
import java.util.ArrayList;
@@ -326,6 +325,8 @@ public int getMaximumResponseBufferSizeInBytes() {
326325
// .trustSource(trustSource)
327326
// .build();
328327
// }
328+
//
329+
// bootstrap.withManInTheMiddle(mitmManager);
329330

330331
try {
331332
bootstrap.withManInTheMiddle(new CertificateSniffingMitmManager(
@@ -953,8 +954,7 @@ public void addLastHttpFilterFactory(HttpFiltersSource filterFactory) {
953954
*/
954955
@Override
955956
public void addResponseFilter(ResponseFilter filter) {
956-
filterFactories.add(new ResponseFilterAdapter.FilterSource(filter));
957-
// addLastHttpFilterFactory();
957+
addLastHttpFilterFactory(new ResponseFilterAdapter.FilterSource(filter));
958958
}
959959

960960
/**
Collapse file

‎app/src/main/java/net/lightbody/bmp/client/ClientUtil.java‎

Copy file name to clipboard
100755100644
Expand all lines: app/src/main/java/net/lightbody/bmp/client/ClientUtil.java
+3-44Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import net.lightbody.bmp.proxy.dns.DnsJavaResolver;
88
import net.lightbody.bmp.proxy.dns.NativeCacheManipulatingResolver;
99
import net.lightbody.bmp.proxy.dns.NativeResolver;
10-
//import org.openqa.selenium.Proxy;
1110

1211
import java.net.InetAddress;
1312
import java.net.InetSocketAddress;
@@ -42,6 +41,7 @@ public static AdvancedHostResolver createNativeResolver() {
4241
* calling {@link net.lightbody.bmp.BrowserMobProxy#setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver)}.
4342
*
4443
* @return a new DnsJavaResolver
44+
* @deprecated The dnsjava resolver has been deprecated in favor of the standard JVM resolver and will be removed in BMP >2.1.
4545
*/
4646
public static AdvancedHostResolver createDnsJavaResolver() {
4747
return new DnsJavaResolver();
@@ -53,58 +53,17 @@ public static AdvancedHostResolver createDnsJavaResolver() {
5353
* Can be used when calling {@link net.lightbody.bmp.BrowserMobProxy#setHostNameResolver(net.lightbody.bmp.proxy.dns.AdvancedHostResolver)}.
5454
*
5555
* @return a new ChainedHostResolver that resolves addresses first using a DnsJavaResolver, then using a NativeCacheManipulatingResolver
56+
* @deprecated The dnsjava resolver has been deprecated in favor of the standard JVM resolver and will be removed in BMP >2.1.
5657
*/
5758
public static AdvancedHostResolver createDnsJavaWithNativeFallbackResolver() {
5859
return new ChainedHostResolver(ImmutableList.of(new DnsJavaResolver(), new NativeCacheManipulatingResolver()));
5960
}
6061

61-
/**
62-
* Creates a Selenium Proxy object from the BrowserMobProxy instance. The BrowserMobProxy must be started. Retrieves the address
63-
* of the Proxy using {@link #getConnectableAddress()}.
64-
*
65-
* @param browserMobProxy started BrowserMobProxy instance to read connection information from
66-
* @return a Selenium Proxy instance, configured to use the BrowserMobProxy instance as its proxy server
67-
* @throws java.lang.IllegalStateException if the proxy has not been started.
68-
*/
69-
// public static org.openqa.selenium.Proxy createSeleniumProxy(BrowserMobProxy browserMobProxy) {
70-
// return createSeleniumProxy(browserMobProxy, getConnectableAddress());
71-
// }
72-
73-
/**
74-
* Creates a Selenium Proxy object from the BrowserMobProxy instance, using the specified connectableAddress as the Selenium Proxy object's
75-
* proxy address. Determines the port using {@link net.lightbody.bmp.BrowserMobProxy#getPort()}. The BrowserMobProxy must be started.
76-
*
77-
* @param browserMobProxy started BrowserMobProxy instance to read the port from
78-
* @param connectableAddress the network address the Selenium Proxy will use to reach this BrowserMobProxy instance
79-
* @return a Selenium Proxy instance, configured to use the BrowserMobProxy instance as its proxy server
80-
* @throws java.lang.IllegalStateException if the proxy has not been started.
81-
*/
82-
// public static org.openqa.selenium.Proxy createSeleniumProxy(BrowserMobProxy browserMobProxy, InetAddress connectableAddress) {
83-
// return createSeleniumProxy(new InetSocketAddress(connectableAddress, browserMobProxy.getPort()));
84-
// }
85-
86-
/**
87-
* Creates a Selenium Proxy object using the specified connectableAddressAndPort as the HTTP proxy server.
88-
*
89-
* @param connectableAddressAndPort the network address (or hostname) and port the Selenium Proxy will use to reach its
90-
* proxy server (the InetSocketAddress may be unresolved).
91-
* @return a Selenium Proxy instance, configured to use the specified address and port as its proxy server
92-
*/
93-
// public static org.openqa.selenium.Proxy createSeleniumProxy(InetSocketAddress connectableAddressAndPort) {
94-
// Proxy proxy = new Proxy();
95-
// proxy.setProxyType(Proxy.ProxyType.MANUAL);
96-
//
97-
// String proxyStr = String.format("%s:%d", connectableAddressAndPort.getHostString(), connectableAddressAndPort.getPort());
98-
// proxy.setHttpProxy(proxyStr);
99-
// proxy.setSslProxy(proxyStr);
100-
//
101-
// return proxy;
102-
// }
103-
10462
/**
10563
* Attempts to retrieve a "connectable" address for this device that other devices on the network can use to connect to a local proxy.
10664
* This is a "reasonable guess" that is suitable in many (but not all) common scenarios.
10765
* TODO: define the algorithm used to discover a "connectable" local host
66+
*
10867
* @return a "reasonable guess" at an address that can be used by other machines on the network to reach this host
10968
*/
11069
public static InetAddress getConnectableAddress() {
Collapse file

‎app/src/main/java/net/lightbody/bmp/core/har/Har.java‎

Copy file name to clipboard
100755100644
Expand all lines: app/src/main/java/net/lightbody/bmp/core/har/Har.java
File mode changed.
Collapse file

‎app/src/main/java/net/lightbody/bmp/core/har/HarCache.java‎

Copy file name to clipboard
100755100644
Expand all lines: app/src/main/java/net/lightbody/bmp/core/har/HarCache.java
File mode changed.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.