Skip to content

Commit

Permalink
feat: block crashlytics, block adjust fully
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfzxcvbn committed Sep 30, 2023
1 parent dd26b8f commit 652c0c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ blocks network requests to the following endpoints:
- discord.com/api/v9/metrics
- adjust
- sentry
- crashlytics
- app-measurement
- firebase logging
- firebase (analytics)

you can get the deb/dylib on [the latest release's page](https://github.com/asdfzxcvbn/DiscordNoTrack/releases/tag/v3.0.1).
you can get the deb/dylib on [the latest release's page](https://github.com/asdfzxcvbn/DiscordNoTrack/releases/tag/v4.0.0).
13 changes: 11 additions & 2 deletions Tweak.xm
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ NSURLRequest *blocked = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http
}
%end

// firebase logging
// firebase logging + adjust network blocking
%hook NSURLSession
- (id)uploadTaskWithRequest:(NSURLRequest *)request fromData:(id)data completionHandler:(id)handler {
if ([request.URL.absoluteString containsString:@"firebaselogging"]) { return %orig(blocked, data, handler); }
return %orig(request, data, handler);
}

- (id)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(id)handler {
if ([request.URL.absoluteString containsString:@"adjust.com"]) { return %orig(blocked, handler); }
// jesus, they apparently own like, 3 domains? that's stupid.
if ([request.URL.absoluteString containsString:@"adjust."]) { return %orig(blocked, handler); }
return %orig(request, handler);
}
%end
Expand Down Expand Up @@ -70,3 +71,11 @@ NSURLRequest *blocked = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http
%hook ADJActivityHandler
- (void)setOfflineMode:(BOOL)a { %orig(YES); }
%end

// crashlytics
%hook FIRCrashlytics
+ (void)load {}
- (void)sendUnsentReports {}
- (void)setIsCrashlyticsCollectionEnabled:(BOOL)a { %orig(NO); }
- (BOOL)isCrashlyticsCollectionEnabled { return NO; }
%end
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fyi.zxcvbn.discordnotrack
Name: DiscordNoTrack
Version: 3.0.1
Version: 4.0.0
Architecture: iphoneos-arm
Description: blocks discord's requests to most (if not all) telemetry endpoints
Author: zxcvbn
Expand Down

0 comments on commit 652c0c0

Please sign in to comment.