Skip to content

Commit

Permalink
AppFilter: it is FAKE before
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Jul 16, 2019
1 parent d50d3d1 commit 9fcb707
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ abstract public class HttpsProvider extends Provider {

private static final String TAG = "HttpsProvider";

protected final WhqList whqList = new WhqList();
final WhqList whqList = new WhqList();

public HttpsProvider(ParcelFileDescriptor descriptor, DaedalusVpnService service) {
HttpsProvider(ParcelFileDescriptor descriptor, DaedalusVpnService service) {
super(descriptor, service);
}

protected OkHttpClient getHttpClient(String accept) {
OkHttpClient getHttpClient(String accept) {
return new OkHttpClient.Builder()
.connectTimeout(10, TimeUnit.SECONDS)
.readTimeout(10, TimeUnit.SECONDS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;

/**
* Daedalus Project
Expand Down Expand Up @@ -126,6 +126,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
this.notification = builder;
}

DNSServerHelper.buildCache();
Daedalus.initRuleResolver();

if (this.mThread == null) {
Expand Down Expand Up @@ -234,17 +235,16 @@ private InetAddress addDnsServer(Builder builder, String format, byte[] ipv6Temp
@Override
public void run() {
try {
DNSServerHelper.buildCache();
Builder builder = new Builder()
.setSession("Daedalus")
.setConfigureIntent(PendingIntent.getActivity(this, 0,
new Intent(this, MainActivity.class).putExtra(MainActivity.LAUNCH_FRAGMENT, MainActivity.FRAGMENT_SETTINGS),
PendingIntent.FLAG_ONE_SHOT));

//Set App Filter
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && Daedalus.getPrefs().getBoolean("settings_app_filter_switch", false)) {
Set<String> apps = Daedalus.getPrefs().getStringSet("filterAppObjects", null);
if (apps != null) {
if (Daedalus.getPrefs().getBoolean("settings_app_filter_switch", false)) {
ArrayList<String> apps = Daedalus.configurations.getAppObjects();
if (apps.size() > 0) {
boolean mode = Daedalus.getPrefs().getBoolean("settings_app_filter_mode_switch", false);
for (String app : apps) {
try {
Expand Down

0 comments on commit 9fcb707

Please sign in to comment.