-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allows build atlantis to a jailbreak tweak
Add theos build support, allows intercepting HTTP/HTTPS traffic for any third party apps under jailbreak environment
- Loading branch information
Showing
11 changed files
with
264 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,3 +67,6 @@ fastlane/report.xml | |
fastlane/Preview.html | ||
fastlane/screenshots | ||
fastlane/test_output | ||
|
||
theos/.theos | ||
theos/packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
TARGET := iphone:clang:latest:11.0 | ||
include $(THEOS)/makefiles/common.mk | ||
|
||
TWEAK_NAME = atlantis | ||
|
||
atlantis_FILES = Tweak.xm \ | ||
../Sources/Atlantis+Manual.swift \ | ||
../Sources/DispatchQueue+Once.swift \ | ||
../Sources/NetworkInjector.swift \ | ||
../Sources/Transporter.swift \ | ||
../Sources/Atlantis.swift \ | ||
../Sources/Message.swift \ | ||
../Sources/PackageIdentifier.swift \ | ||
../Sources/Configuration.swift \ | ||
../Sources/NetworkInjector+URLConnection.swift \ | ||
../Sources/Packages.swift \ | ||
../Sources/DataCompression.swift \ | ||
../Sources/NetworkInjector+URLSession.swift \ | ||
../Sources/Runtime.swift | ||
atlantis_CFLAGS = -fobjc-arc | ||
atlantis_LIBRARIES = applist | ||
|
||
include $(THEOS_MAKE_PATH)/tweak.mk | ||
|
||
after-install:: | ||
# Respring the device | ||
install.exec "killall -9 SpringBoard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Build and Use | ||
|
||
```shell | ||
### First install and setup theos | ||
sudo git clone --recursive https://github.com/theos/theos /opt/theos | ||
export THEOS=/opt/theos | ||
export THEOS_DEVICE_IP=YouriPhoneIP | ||
|
||
### Build tweak | ||
git clone https://github.com/runatlantis/atlantis | ||
cd atlantis/theos | ||
|
||
make -j4 | ||
make package | ||
|
||
#before install, make sure install applist, preferenceloader from cydia | ||
make install | ||
|
||
### Phone will restart SpringBoard, then Open Settings - Atlantis enable/disable app you want | ||
### restart the target app, and you can see network traffics on Proxyman | ||
``` | ||
|
||
<img src="assets/settings1.png" width="100"/> | ||
<img src="assets/settings2.png" width="100"/> | ||
![proxyman](assets/ProxyMan.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#import <atlantis-Swift.h> | ||
#import <Foundation/Foundation.h> | ||
|
||
%ctor { | ||
NSLog(@"[atlantis] init..."); | ||
NSString *path = @"/var/mobile/Library/Preferences/proxyman.atlantis.settings.plist"; | ||
NSString *enableHostKeyPath = @"shouldEnableHost"; | ||
NSString *hostKeyPath = @"host"; | ||
NSDictionary *prefs = [NSDictionary dictionaryWithContentsOfFile:path]; | ||
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; | ||
NSString *keyPath = [NSString stringWithFormat:@"Settings-%@", bundleIdentifier]; | ||
BOOL enabled = NO; | ||
if (([[prefs objectForKey:keyPath] boolValue])) { | ||
enabled = YES; | ||
} | ||
NSLog(@"[atlantis] enable for [%@] ? %@", bundleIdentifier, enabled ? @"Y":@"N"); | ||
if (enabled) { | ||
BOOL enableHost = NO; | ||
if (([[prefs objectForKey:enableHostKeyPath] boolValue])) { | ||
enableHost = YES; | ||
} | ||
NSString *hostName = [prefs objectForKey:hostKeyPath]; | ||
NSLog(@"[atlantis] enable Customized Host? %@", enableHost ? @"Y":@"N"); | ||
if (enableHost && hostName != nil) { | ||
NSLog(@"[atlantis] Customized Host %@", hostName); | ||
[Atlantis startWithHostName:hostName]; | ||
} else { | ||
NSLog(@"[atlantis] start without Specfic Host"); | ||
[Atlantis startWithHostName:nil]; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
Filter = { | ||
Bundles = ( | ||
"com.apple.UIKit" | ||
); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: proxyman.atlantis | ||
Name: atlantis | ||
Depends: mobilesubstrate, applist, preferenceloader, ${LIBSWIFT} | ||
Version: 0.0.1 | ||
Architecture: iphoneos-arm | ||
Description: http(s) intercepting for proxyman | ||
Maintainer: atlantis | ||
Author: atlantis | ||
Section: Tweaks |
58 changes: 58 additions & 0 deletions
58
theos/layout/Library/PreferenceLoader/Preferences/atlantis_prefs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"entry": { | ||
"label": "Atlantis", | ||
"cell": "PSLinkCell", | ||
"icon": "" | ||
}, | ||
"items": [ | ||
{ | ||
"label": "", | ||
"cell": "PSGroupCell", | ||
"footerText": "Intercepting Http(s) Traffics by ProxyMan" | ||
}, | ||
{ | ||
"cell": "PSSwitchCell", | ||
"label": "Enable ProxyMan Host", | ||
"default": false, | ||
"defaults": "proxyman.atlantis.settings", | ||
"key": "shouldEnableHost" | ||
}, | ||
{ | ||
"defaults": "proxyman.atlantis.settings", | ||
"cell": "PSEditTextCell", | ||
"label": "Host(IP):", | ||
"key": "host", | ||
"keyboard": "", | ||
"noAutoCorrect": true, | ||
"default": "" | ||
}, | ||
{ | ||
"ALAllowsSelection": "1", | ||
"ALChangeNotification": "com.rpetrich.applist.sample.notification", | ||
"ALSectionDescriptors": [ | ||
{ | ||
"cell-class-name": "ALSwitchCell", | ||
"icon-size": "29", | ||
"predicate": "isSystemApplication = FALSE", | ||
"suppress-hidden-apps": "1", | ||
"title": "User Applications" | ||
}, | ||
{ | ||
"cell-class-name": "ALSwitchCell", | ||
"icon-size": "29", | ||
"predicate": "isSystemApplication = TRUE", | ||
"suppress-hidden-apps": "1", | ||
"title": "System Applications" | ||
} | ||
], | ||
"ALSettingsKeyPrefix": "Settings-", | ||
"ALSettingsPath": "\/var\/mobile\/Library\/Preferences\/proxyman.atlantis.settings.plist", | ||
"bundle": "AppList", | ||
"cell": "PSLinkCell", | ||
"icon": "\/Applications\/Preferences.app\/Settings.png", | ||
"isController": "1", | ||
"label": "Enabled App List" | ||
} | ||
], | ||
"title": "Intercepting Http(s) Traffics by ProxyMan" | ||
} |
103 changes: 103 additions & 0 deletions
103
theos/layout/Library/PreferenceLoader/Preferences/atlantis_prefs.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>entry</key> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSLinkCell</string> | ||
<key>icon</key> | ||
<string></string> | ||
<key>label</key> | ||
<string>Atlantis</string> | ||
</dict> | ||
<key>items</key> | ||
<array> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSGroupCell</string> | ||
<key>footerText</key> | ||
<string>Intercepting Http(s) Traffics by ProxyMan</string> | ||
<key>label</key> | ||
<string></string> | ||
</dict> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSSwitchCell</string> | ||
<key>default</key> | ||
<false/> | ||
<key>defaults</key> | ||
<string>proxyman.atlantis.settings</string> | ||
<key>key</key> | ||
<string>shouldEnableHost</string> | ||
<key>label</key> | ||
<string>Enable ProxyMan Host</string> | ||
</dict> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSEditTextCell</string> | ||
<key>default</key> | ||
<string></string> | ||
<key>defaults</key> | ||
<string>proxyman.atlantis.settings</string> | ||
<key>key</key> | ||
<string>host</string> | ||
<key>keyboard</key> | ||
<string></string> | ||
<key>label</key> | ||
<string>Host(IP):</string> | ||
<key>noAutoCorrect</key> | ||
<true/> | ||
</dict> | ||
<dict> | ||
<key>ALAllowsSelection</key> | ||
<string>1</string> | ||
<key>ALChangeNotification</key> | ||
<string>com.rpetrich.applist.sample.notification</string> | ||
<key>ALSectionDescriptors</key> | ||
<array> | ||
<dict> | ||
<key>cell-class-name</key> | ||
<string>ALSwitchCell</string> | ||
<key>icon-size</key> | ||
<string>29</string> | ||
<key>predicate</key> | ||
<string>isSystemApplication = FALSE</string> | ||
<key>suppress-hidden-apps</key> | ||
<string>1</string> | ||
<key>title</key> | ||
<string>User Applications</string> | ||
</dict> | ||
<dict> | ||
<key>cell-class-name</key> | ||
<string>ALSwitchCell</string> | ||
<key>icon-size</key> | ||
<string>29</string> | ||
<key>predicate</key> | ||
<string>isSystemApplication = TRUE</string> | ||
<key>suppress-hidden-apps</key> | ||
<string>1</string> | ||
<key>title</key> | ||
<string>System Applications</string> | ||
</dict> | ||
</array> | ||
<key>ALSettingsKeyPrefix</key> | ||
<string>Settings-</string> | ||
<key>ALSettingsPath</key> | ||
<string>/var/mobile/Library/Preferences/proxyman.atlantis.settings.plist</string> | ||
<key>bundle</key> | ||
<string>AppList</string> | ||
<key>cell</key> | ||
<string>PSLinkCell</string> | ||
<key>icon</key> | ||
<string>/Applications/Preferences.app/Settings.png</string> | ||
<key>isController</key> | ||
<string>1</string> | ||
<key>label</key> | ||
<string>Enabled App List</string> | ||
</dict> | ||
</array> | ||
<key>title</key> | ||
<string>Intercepting Http(s) Traffics by ProxyMan</string> | ||
</dict> | ||
</plist> |