Skip to content

Commit

Permalink
update host
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojieonly committed Nov 5, 2024
1 parent f11462f commit 1107be1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
22 changes: 12 additions & 10 deletions app/src/main/java/com/hippo/ehviewer/client/EhHosts.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,35 +78,37 @@ public class EhHosts implements Dns {

if (Settings.getBuiltEXHosts()) {
put(map, "exhentai.org",
"104.24.56.202",
"178.175.128.251",
"178.175.128.252",
"178.175.128.253",
"178.175.128.254",
// "104.24.56.202",
"178.175.129.251",
"178.175.129.252",
"178.175.129.253",
"178.175.129.254",
"178.175.128.251",
"178.175.128.252",
"178.175.128.253",
"178.175.128.254",
"178.175.132.19",
"178.175.132.20",
"178.175.132.21",
"178.175.132.22"
// "172.67.187.219"
);
put(map, "upld.exhentai.org", "178.175.132.22", "178.175.129.254", "178.175.128.254");
put(map, "s.exhentai.org",
"104.24.56.202",
"178.175.128.251",
"178.175.128.252",
"178.175.128.253",
"178.175.128.254",
"178.175.129.251",
"178.175.129.252",
"178.175.129.253",
"178.175.129.254",
"178.175.128.251",
"178.175.128.252",
"178.175.128.253",
"178.175.128.254",
"178.175.132.19",
"178.175.132.20",
"178.175.132.21",
"178.175.132.22"
"178.175.132.22",
"172.67.187.219"
);
}

Expand Down
8 changes: 5 additions & 3 deletions app/src/main/java/com/hippo/okhttp/ChromeRequestBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ public class ChromeRequestBuilder extends Request.Builder {
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36";

private static final String CHROME_ACCEPT =
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;" +
"q=0.8,application/signed-exchange;v=b3;q=0.9";
"image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8";
private static final String CHROME_ACCEPT_ENCODING =
"gzip, deflate, br, zstd";

private static final String CHROME_ACCEPT_LANGUAGE =
"en-US,en;q=0.9";
"zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7";
// private static final String SOURCE_APP = "Ehviewer";

private static final String CHROME_SEC_FETCH_DEST = "empty";
Expand All @@ -57,6 +58,7 @@ public ChromeRequestBuilder(String url) {
addHeader("Host", host);
addHeader("User-Agent", CHROME_USER_AGENT);
addHeader("Accept", CHROME_ACCEPT);
// addHeader("Accept-Encoding", CHROME_ACCEPT_ENCODING);
addHeader("Accept-Language", CHROME_ACCEPT_LANGUAGE);
// addHeader("Source-App", SOURCE_APP);
// addHeader("Sec-Fetch-Dest", CHROME_SEC_FETCH_DEST);
Expand Down
10 changes: 0 additions & 10 deletions app/src/main/java/com/hippo/widget/AvatarImageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,6 @@ public void load(String key, String url, boolean useNetwork) {
.setKey(key)
.setUrl(url)
.setUseNetwork(useNetwork);
if (url.contains(DOMAIN_EX) || url.contains(DOMAIN_E)) {
builder.setOkHttpClient(EhApplication.getOkHttpClient(getContext()));
}
// ConacoTask.Builder<ImageBitmap> builder = new ConacoTask.Builder<>();
// builder.unikery = this;
// builder.key = key;
// builder.url = url;
// builder.dataContainer= container;
// builder.useNetwork= useNetwork;
// builder.okHttpClient= EhApplication.getImageOkHttpClient(getContext());
mConaco.load(builder);
}

Expand Down

0 comments on commit 1107be1

Please sign in to comment.