Skip to content

Commit

Permalink
Use random IP
Browse files Browse the repository at this point in the history
  • Loading branch information
w4123 committed Apr 15, 2022
1 parent 545a7ac commit f1612ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Easy163/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "org.ndroi.easy163"
minSdkVersion 24
targetSdkVersion 29
versionCode 24
versionName "1.8.6"
versionCode 25
versionName "1.8.7"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
package org.ndroi.easy163.hooks;

import android.util.Log;

import org.ndroi.easy163.vpn.hookhttp.Hook;
import org.ndroi.easy163.vpn.hookhttp.Request;

import java.util.Random;

public abstract class BaseHook extends Hook
{
private static final String ip = String.format("175.17.%d.%d", new Random().nextInt(256), new Random().nextInt(256));

@Override
public void hookRequest(Request request)
{
request.getHeaderFields().remove("X-NAPM-RETRY");
request.getHeaderFields().remove("Accept-Encoding");
request.getHeaderFields().put("X-Real-IP", "175.17.223.14");
request.getHeaderFields().put("X-Real-IP", ip);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void onReceive(Context context, Intent intent)
if(isServiceRunning)
{
EasyLog.log("Easy163 VPN 正在运行");
EasyLog.log("版本更新关注 Github Release");
EasyLog.log("原作者: ndroi, 此版本由溯洄w4123修改");
}else
{
EasyLog.log("Easy163 VPN 停止运行");
Expand Down

0 comments on commit f1612ba

Please sign in to comment.