-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
4,945 additions
and
5,277 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,87 @@ | ||
#!/system/bin/sh | ||
|
||
export PYTHONPATH=/data/data/org.gaeproxy/python:/data/data/org.gaeproxy/python/lib/python2.6:/data/data/org.gaeproxy/python/lib/python2.6/lib-dynload:/data/data/org.gaeproxy/python/lib:/sdcard/python-extras | ||
export LD_LIBRARY_PATH=/data/data/org.gaeproxy/python/lib | ||
export PYTHONHOME=$PYTHONHOME:/data/data/org.gaeproxy/python | ||
export TEMP=/sdcard/python-extras | ||
|
||
echo "" > /data/data/org.gaeproxy/python.pid | ||
chmod 777 /data/data/org.gaeproxy/python.pid | ||
|
||
case $1 in | ||
|
||
goagent) | ||
|
||
echo " | ||
[listen] | ||
ip = 127.0.0.1 | ||
port = $3 | ||
visible = 1 | ||
debug = INFO | ||
[hosts] | ||
# NOTE: Only effect on https | ||
[gae] | ||
host = $2 | ||
password = $6 | ||
path = /$5 | ||
prefer = http | ||
http_timeout = 5 | ||
http_step = 8 | ||
https_timeout = 8 | ||
https_step = 16 | ||
http = $4 | ||
https = $4 | ||
"> /data/data/org.gaeproxy/proxy.ini | ||
|
||
|
||
/data/data/org.gaeproxy/python/bin/python /data/data/org.gaeproxy/goagent.py | ||
|
||
;; | ||
|
||
gappproxy) | ||
|
||
/data/data/org.gaeproxy/python/bin/python /data/data/org.gaeproxy/gappproxy.py | ||
|
||
;; | ||
|
||
wallproxy) | ||
|
||
echo " | ||
server['listen'] = ('127.0.0.1', $3) | ||
server['log_file'] = None | ||
gaeproxy = [{ | ||
'url': '$2', | ||
'key': '$4', | ||
'crypto':'XOR--0', | ||
'max_threads':5 | ||
}] | ||
plugins['plugins.gaeproxy'] = 'gaeproxy' | ||
def find_http_handler(method, url, headers): | ||
if method not in ('GET', 'HEAD', 'PUT', 'POST', 'DELETE'): | ||
return rawproxy[0] | ||
if 80<=url.port<=90 or 440<=url.port<=450 or url.port>=1024: | ||
return gaeproxy | ||
return None | ||
fakehttps = None | ||
plugins['plugins.fakehttps'] = 'fakehttps' | ||
def find_sock_handler(reqtype, ip, port, cmd): | ||
if reqtype == 'https': return fakehttps | ||
return None | ||
def check_client(ip, reqtype, args): | ||
return True | ||
" > /data/data/org.gaeproxy/proxy.conf | ||
/data/data/org.gaeproxy/python/bin/python /data/data/org.gaeproxy/wallproxy.py | ||
|
||
;; | ||
|
||
esac |
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,49 @@ | ||
#!/system/bin/sh | ||
|
||
DIR=/data/data/org.gaeproxy | ||
|
||
PATH=$DIR:$PATH | ||
|
||
case $1 in | ||
start) | ||
|
||
echo " | ||
base { | ||
log_debug = off; | ||
log_info = off; | ||
log = stderr; | ||
daemon = on; | ||
redirector = iptables; | ||
} | ||
" >$DIR/redsocks.conf | ||
|
||
echo " | ||
redsocks { | ||
local_ip = 127.0.0.1; | ||
local_port = 8123; | ||
ip = 127.0.0.1; | ||
port = $2; | ||
type = http-relay; | ||
} | ||
redsocks { | ||
local_ip = 127.0.0.1; | ||
local_port = 8124; | ||
ip = $3; | ||
port = $4; | ||
type = socks5; | ||
} | ||
" >>$DIR/redsocks.conf | ||
|
||
$DIR/redsocks -p $DIR/redsocks.pid -c $DIR/redsocks.conf | ||
|
||
;; | ||
stop) | ||
kill -9 `cat $DIR/redsocks.pid` | ||
kill -9 `cat $DIR/python.pid` | ||
killall -9 python | ||
killall -9 redsocks | ||
|
||
rm $DIR/redsocks.conf | ||
|
||
;; | ||
esac |
Binary file not shown.
Binary file not shown.
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,12 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys, os | ||
pid = str(os.getpid()) | ||
f = open('/data/data/org.gaeproxy/python.pid','w') | ||
f.write(pid) | ||
f.close() | ||
dir = os.path.abspath(os.path.dirname(sys.argv[0])) | ||
sys.path.append(os.path.join(dir, 'src.zip')) | ||
del sys, os, dir | ||
import ProxyServer | ||
ProxyServer.main() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" android:duplicateParentState="false"> | ||
<TextView android:text="@string/proxyed_help" | ||
android:layout_width="fill_parent" android:layout_height="wrap_content" | ||
android:textSize="16sp" android:padding="3px" /> | ||
<ListView android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" android:id="@+id/applistview"></ListView> | ||
</LinearLayout> |
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" android:layout_height="fill_parent" | ||
android:stretchColumns="1"> | ||
<TableRow> | ||
<ImageView android:id="@+id/itemicon" android:layout_width="48sp" | ||
android:layout_height="48sp" android:scaleType="fitCenter" | ||
android:padding="3dip"></ImageView> | ||
|
||
<TextView android:layout_height="wrap_content" android:id="@+id/itemtext" | ||
android:text="uid:packages" android:maxLength="25" android:textSize="18sp" android:padding="3dip"></TextView> | ||
|
||
<CheckBox android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" android:id="@+id/itemcheck"></CheckBox> | ||
|
||
</TableRow> | ||
</TableLayout> |
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="horizontal" android:layout_width="fill_parent" | ||
android:layout_height="fill_parent"> | ||
<ImageView android:id="@+id/image" android:layout_width="wrap_content" | ||
android:layout_height="fill_parent" android:layout_marginLeft="10dp" | ||
android:layout_marginRight="10dp" android:src="@drawable/icon" /> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="wrap_content" android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
<TextView android:id="@+id/down_tv" android:layout_width="wrap_content" | ||
android:layout_height="fill_parent" android:textSize="14sp" | ||
android:paddingBottom="4dp" android:text="@string/downloading" /> | ||
<ProgressBar android:id="@+id/pb" android:layout_width="200dp" | ||
android:layout_height="wrap_content" style="?android:attr/progressBarStyleHorizontal" /> | ||
</LinearLayout> | ||
</LinearLayout> |
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,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:myapp="http://schemas.android.com/apk/res/v.sched.quite" | ||
android:id="@+id/mainLayout" android:orientation="vertical" | ||
android:layout_width="fill_parent" android:layout_height="fill_parent"> | ||
<LinearLayout android:id="@+id/ad" android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" /> | ||
<ListView android:id="@android:id/list" android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" android:drawSelectorOnTop="false" | ||
android:scrollbarAlwaysDrawVerticalTrack="true" /> | ||
|
||
</LinearLayout> |
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TextView xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:minWidth="80dp" android:maxWidth="80dp" android:gravity="center" | ||
android:textSize="70sp" android:textColor="#ffffffff" | ||
android:background="#99000088" android:padding="10dp" | ||
android:visibility="invisible" /> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.