Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
3d664377
Commit
3d664377
authored
Apr 29, 2013
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
a74c3fde
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
2337 additions
and
2465 deletions
+2337
-2465
res/drawable/btn_cab_done_shadow.xml
res/drawable/btn_cab_done_shadow.xml
+6
-6
res/drawable/pressed_background_shadow.xml
res/drawable/pressed_background_shadow.xml
+1
-1
res/drawable/progress_horizontal_shadow.xml
res/drawable/progress_horizontal_shadow.xml
+12
-12
res/drawable/selectable_background_shadow.xml
res/drawable/selectable_background_shadow.xml
+5
-4
res/drawable/spinner_background_ab_shadow.xml
res/drawable/spinner_background_ab_shadow.xml
+7
-7
res/drawable/tab_indicator_ab_shadow.xml
res/drawable/tab_indicator_ab_shadow.xml
+21
-13
res/layout/layout_apps.xml
res/layout/layout_apps.xml
+7
-7
res/layout/layout_apps_item.xml
res/layout/layout_apps_item.xml
+25
-25
res/layout/layout_switch.xml
res/layout/layout_switch.xml
+19
-19
res/layout/overlay.xml
res/layout/overlay.xml
+4
-4
res/values-v14/styles_shadow.xml
res/values-v14/styles_shadow.xml
+34
-33
res/values/colors.xml
res/values/colors.xml
+6
-6
res/values/strings.xml
res/values/strings.xml
+115
-115
res/values/styles_shadow.xml
res/values/styles_shadow.xml
+61
-59
res/xml/pref_feature.xml
res/xml/pref_feature.xml
+44
-44
res/xml/pref_proxy.xml
res/xml/pref_proxy.xml
+31
-31
res/xml/shadowsocks_headers.xml
res/xml/shadowsocks_headers.xml
+10
-10
src/com/github/shadowsocks/AppManager.java
src/com/github/shadowsocks/AppManager.java
+281
-307
src/com/github/shadowsocks/Exec.java
src/com/github/shadowsocks/Exec.java
+33
-38
src/com/github/shadowsocks/ImageLoader.java
src/com/github/shadowsocks/ImageLoader.java
+167
-173
src/com/github/shadowsocks/ImageLoaderFactory.java
src/com/github/shadowsocks/ImageLoaderFactory.java
+6
-6
src/com/github/shadowsocks/ProxyedApp.java
src/com/github/shadowsocks/ProxyedApp.java
+54
-78
src/com/github/shadowsocks/Shadowsocks.java
src/com/github/shadowsocks/Shadowsocks.java
+459
-492
src/com/github/shadowsocks/ShadowsocksApplication.java
src/com/github/shadowsocks/ShadowsocksApplication.java
+9
-10
src/com/github/shadowsocks/ShadowsocksReceiver.java
src/com/github/shadowsocks/ShadowsocksReceiver.java
+36
-36
src/com/github/shadowsocks/ShadowsocksService.java
src/com/github/shadowsocks/ShadowsocksService.java
+505
-525
src/com/github/shadowsocks/System.java
src/com/github/shadowsocks/System.java
+4
-4
src/com/github/shadowsocks/Utils.java
src/com/github/shadowsocks/Utils.java
+356
-376
src/com/github/shadowsocks/preferences/SummaryEditTextPreference.java
...ub/shadowsocks/preferences/SummaryEditTextPreference.java
+19
-24
No files found.
res/drawable/btn_cab_done_shadow.xml
View file @
3d664377
...
...
@@ -18,10 +18,10 @@
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/btn_cab_done_pressed_shadow"
/>
<item
android:state_focused=
"true"
android:state_enabled=
"true"
android:drawable=
"@drawable/btn_cab_done_focused_shadow"
/>
<item
android:state_enabled=
"true"
android:drawable=
"@drawable/btn_cab_done_default_shadow"
/>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/btn_cab_done_pressed_shadow"
/>
<item
android:state_focused=
"true"
android:state_enabled=
"true"
android:drawable=
"@drawable/btn_cab_done_focused_shadow"
/>
<item
android:state_enabled=
"true"
android:drawable=
"@drawable/btn_cab_done_default_shadow"
/>
</selector>
res/drawable/pressed_background_shadow.xml
View file @
3d664377
...
...
@@ -18,5 +18,5 @@
-->
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/pressed_shadow"
/>
<solid
android:color=
"@color/pressed_shadow"
/>
</shape>
res/drawable/progress_horizontal_shadow.xml
View file @
3d664377
...
...
@@ -19,17 +19,17 @@
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
android:drawable=
"@drawable/progress_bg_shadow"
/>
<item
android:id=
"@android:id/secondaryProgress"
>
<scale
android:scaleWidth=
"100%"
android:drawable=
"@drawable/progress_secondary_shadow"
/>
</item>
<item
android:id=
"@android:id/progress"
>
<scale
android:scaleWidth=
"100%"
android:drawable=
"@drawable/progress_primary_shadow"
/>
</item>
<item
android:id=
"@android:id/background"
android:drawable=
"@drawable/progress_bg_shadow"
/>
<item
android:id=
"@android:id/secondaryProgress"
>
<scale
android:scaleWidth=
"100%"
android:drawable=
"@drawable/progress_secondary_shadow"
/>
</item>
<item
android:id=
"@android:id/progress"
>
<scale
android:scaleWidth=
"100%"
android:drawable=
"@drawable/progress_primary_shadow"
/>
</item>
</layer-list>
res/drawable/selectable_background_shadow.xml
View file @
3d664377
...
...
@@ -18,8 +18,9 @@
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:exitFadeDuration=
"@android:integer/config_mediumAnimTime"
>
<item
android:state_pressed=
"false"
android:state_focused=
"true"
android:drawable=
"@drawable/list_focused_shadow"
/>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/pressed_background_shadow"
/>
<item
android:drawable=
"@android:color/transparent"
/>
android:exitFadeDuration=
"@android:integer/config_mediumAnimTime"
>
<item
android:state_pressed=
"false"
android:state_focused=
"true"
android:drawable=
"@drawable/list_focused_shadow"
/>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/pressed_background_shadow"
/>
<item
android:drawable=
"@android:color/transparent"
/>
</selector>
\ No newline at end of file
res/drawable/spinner_background_ab_shadow.xml
View file @
3d664377
...
...
@@ -18,11 +18,11 @@
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"false"
android:drawable=
"@drawable/spinner_ab_disabled_shadow"
/>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/spinner_ab_pressed_shadow"
/>
<item
android:state_pressed=
"false"
android:state_focused=
"true"
android:drawable=
"@drawable/spinner_ab_focused_shadow"
/>
<item
android:drawable=
"@drawable/spinner_ab_default_shadow"
/>
<item
android:state_enabled=
"false"
android:drawable=
"@drawable/spinner_ab_disabled_shadow"
/>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/spinner_ab_pressed_shadow"
/>
<item
android:state_pressed=
"false"
android:state_focused=
"true"
android:drawable=
"@drawable/spinner_ab_focused_shadow"
/>
<item
android:drawable=
"@drawable/spinner_ab_default_shadow"
/>
</selector>
res/drawable/tab_indicator_ab_shadow.xml
View file @
3d664377
...
...
@@ -18,20 +18,28 @@
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- Non focused states -->
<item
android:state_focused=
"false"
android:state_selected=
"false"
android:state_pressed=
"false"
android:drawable=
"@android:color/transparent"
/>
<item
android:state_focused=
"false"
android:state_selected=
"true"
android:state_pressed=
"false"
android:drawable=
"@drawable/tab_selected_shadow"
/>
<!-- Non focused states -->
<item
android:state_focused=
"false"
android:state_selected=
"false"
android:state_pressed=
"false"
android:drawable=
"@android:color/transparent"
/>
<item
android:state_focused=
"false"
android:state_selected=
"true"
android:state_pressed=
"false"
android:drawable=
"@drawable/tab_selected_shadow"
/>
<!-- Focused states -->
<item
android:state_focused=
"true"
android:state_selected=
"false"
android:state_pressed=
"false"
android:drawable=
"@drawable/tab_unselected_focused_shadow"
/>
<item
android:state_focused=
"true"
android:state_selected=
"true"
android:state_pressed=
"false"
android:drawable=
"@drawable/tab_selected_focused_shadow"
/>
<!-- Focused states -->
<item
android:state_focused=
"true"
android:state_selected=
"false"
android:state_pressed=
"false"
android:drawable=
"@drawable/tab_unselected_focused_shadow"
/>
<item
android:state_focused=
"true"
android:state_selected=
"true"
android:state_pressed=
"false"
android:drawable=
"@drawable/tab_selected_focused_shadow"
/>
<!-- Pressed -->
<!-- Non focused states -->
<item
android:state_focused=
"false"
android:state_selected=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_unselected_pressed_shadow"
/>
<item
android:state_focused=
"false"
android:state_selected=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_selected_pressed_shadow"
/>
<!-- Pressed -->
<!-- Non focused states -->
<item
android:state_focused=
"false"
android:state_selected=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_unselected_pressed_shadow"
/>
<item
android:state_focused=
"false"
android:state_selected=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_selected_pressed_shadow"
/>
<!-- Focused states -->
<item
android:state_focused=
"true"
android:state_selected=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_unselected_pressed_shadow"
/>
<item
android:state_focused=
"true"
android:state_selected=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_selected_pressed_shadow"
/>
<!-- Focused states -->
<item
android:state_focused=
"true"
android:state_selected=
"false"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_unselected_pressed_shadow"
/>
<item
android:state_focused=
"true"
android:state_selected=
"true"
android:state_pressed=
"true"
android:drawable=
"@drawable/tab_selected_pressed_shadow"
/>
</selector>
res/layout/layout_apps.xml
View file @
3d664377
<?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/proxied_help"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:textSize=
"16sp"
android:padding=
"3dp"
/>
<ListView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/applistview"
/>
android:layout_height=
"fill_parent"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:duplicateParentState=
"false"
>
<TextView
android:text=
"@string/proxied_help"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:textSize=
"16sp"
android:padding=
"3dp"
/>
<ListView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/applistview"
/>
</LinearLayout>
\ No newline at end of file
res/layout/layout_apps_item.xml
View file @
3d664377
<?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"
>
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:stretchColumns=
"1"
>
<TableRow>
<TableRow>
<ImageView
android:id=
"@+id/itemicon"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:scaleType=
"fitCenter"
android:padding=
"3dp"
/>
<ImageView
android:id=
"@+id/itemicon"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:scaleType=
"fitCenter"
android:padding=
"3dp"
/>
<TextView
android:id=
"@+id/itemtext"
android:layout_width=
"wrap_content"
android:layout_height=
"fill_parent"
android:text=
"uid:packages"
android:gravity=
"center_vertical"
android:maxLength=
"25"
android:textSize=
"18sp"
android:padding=
"3dp"
/>
<TextView
android:id=
"@+id/itemtext"
android:layout_width=
"wrap_content"
android:layout_height=
"fill_parent"
android:text=
"uid:packages"
android:gravity=
"center_vertical"
android:maxLength=
"25"
android:textSize=
"18sp"
android:padding=
"3dp"
/>
<CheckBox
android:id=
"@+id/itemcheck"
android:layout_width=
"wrap_content"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"6dp"
/>
<CheckBox
android:id=
"@+id/itemcheck"
android:layout_width=
"wrap_content"
android:layout_height=
"fill_parent"
android:layout_marginRight=
"6dp"
/>
</TableRow>
</TableRow>
</TableLayout>
res/layout/layout_switch.xml
View file @
3d664377
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<TextView
android:id=
"@+id/title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"16dp"
android:textSize=
"28sp"
android:textColor=
"@color/title"
android:text=
"@string/app_name"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
/>
<TextView
android:id=
"@+id/title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"16dp"
android:textSize=
"28sp"
android:textColor=
"@color/title"
android:text=
"@string/app_name"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
/>
<org.jraf.android.backport.switchwidget.Switch
android:id=
"@+id/switchButton"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
/>
<org.jraf.android.backport.switchwidget.Switch
android:id=
"@+id/switchButton"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
/>
</RelativeLayout>
res/layout/overlay.xml
View file @
3d664377
<?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"
/>
\ No newline at end of file
android:minWidth=
"80dp"
android:maxWidth=
"80dp"
android:gravity=
"center"
android:textSize=
"70sp"
android:textColor=
"#ffffffff"
android:background=
"#99000088"
android:padding=
"10dp"
android:visibility=
"invisible"
/>
\ No newline at end of file
res/values-v14/styles_shadow.xml
View file @
3d664377
...
...
@@ -19,38 +19,39 @@
<resources>
<style
name=
"Theme.Shadow"
parent=
"@style/Theme.Sherlock.Light.DarkActionBar"
>
<item
name=
"android:actionBarItemBackground"
>
@drawable/selectable_background_shadow
</item>
<item
name=
"android:popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"android:dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
<item
name=
"android:actionBarTabStyle"
>
@style/ActionBarTabStyle.Shadow
</item>
<item
name=
"android:actionDropDownStyle"
>
@style/DropDownNav.Shadow
</item>
<item
name=
"android:actionBarStyle"
>
@style/ActionBar.Solid.Shadow
</item>
<item
name=
"android:actionModeBackground"
>
@drawable/cab_background_top_shadow
</item>
<item
name=
"android:actionModeSplitBackground"
>
@drawable/cab_background_bottom_shadow
</item>
<item
name=
"android:actionModeCloseButtonStyle"
>
@style/ActionButton.CloseMode.Shadow
</item>
<!-- Light.DarkActionBar specific -->
<item
name=
"android:actionBarWidgetTheme"
>
@style/Theme.Shadow.Widget
</item>
</style>
<style
name=
"ActionBar.Solid.Shadow"
parent=
"@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse"
>
<item
name=
"android:background"
>
@drawable/ab_solid_shadow
</item>
<item
name=
"android:backgroundStacked"
>
@drawable/ab_stacked_solid_shadow
</item>
<item
name=
"android:backgroundSplit"
>
@drawable/ab_bottom_solid_shadow
</item>
<item
name=
"android:progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<style
name=
"ActionBar.Transparent.Shadow"
parent=
"@style/Widget.Sherlock.ActionBar"
>
<item
name=
"android:background"
>
@drawable/ab_transparent_shadow
</item>
<item
name=
"android:progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style
name=
"Theme.Shadow.Widget"
parent=
"@style/Theme.Sherlock"
>
<item
name=
"android:popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"android:dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
</style>
<style
name=
"Theme.Shadow"
parent=
"@style/Theme.Sherlock.Light.DarkActionBar"
>
<item
name=
"android:actionBarItemBackground"
>
@drawable/selectable_background_shadow
</item>
<item
name=
"android:popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"android:dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
<item
name=
"android:actionBarTabStyle"
>
@style/ActionBarTabStyle.Shadow
</item>
<item
name=
"android:actionDropDownStyle"
>
@style/DropDownNav.Shadow
</item>
<item
name=
"android:actionBarStyle"
>
@style/ActionBar.Solid.Shadow
</item>
<item
name=
"android:actionModeBackground"
>
@drawable/cab_background_top_shadow
</item>
<item
name=
"android:actionModeSplitBackground"
>
@drawable/cab_background_bottom_shadow
</item>
<item
name=
"android:actionModeCloseButtonStyle"
>
@style/ActionButton.CloseMode.Shadow
</item>
<!-- Light.DarkActionBar specific -->
<item
name=
"android:actionBarWidgetTheme"
>
@style/Theme.Shadow.Widget
</item>
</style>
<style
name=
"ActionBar.Solid.Shadow"
parent=
"@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse"
>
<item
name=
"android:background"
>
@drawable/ab_solid_shadow
</item>
<item
name=
"android:backgroundStacked"
>
@drawable/ab_stacked_solid_shadow
</item>
<item
name=
"android:backgroundSplit"
>
@drawable/ab_bottom_solid_shadow
</item>
<item
name=
"android:progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<style
name=
"ActionBar.Transparent.Shadow"
parent=
"@style/Widget.Sherlock.ActionBar"
>
<item
name=
"android:background"
>
@drawable/ab_transparent_shadow
</item>
<item
name=
"android:progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style
name=
"Theme.Shadow.Widget"
parent=
"@style/Theme.Sherlock"
>
<item
name=
"android:popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"android:dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
</style>
</resources>
\ No newline at end of file
res/values/colors.xml
View file @
3d664377
...
...
@@ -16,11 +16,11 @@
<resources>
<color
name=
"title_background"
>
#ff5e5e5e
</color>
<color
name=
"dialog_title_background"
>
#17170443
</color>
<color
name=
"black"
>
#000000
</color>
<color
name=
"grey1"
>
#646464
</color>
<color
name=
"grey2"
>
#c8c8c8
</color>
<color
name=
"grey3"
>
#323232
</color>
<color
name=
"title_background"
>
#ff5e5e5e
</color>
<color
name=
"dialog_title_background"
>
#17170443
</color>
<color
name=
"black"
>
#000000
</color>
<color
name=
"grey1"
>
#646464
</color>
<color
name=
"grey2"
>
#c8c8c8
</color>
<color
name=
"grey3"
>
#323232
</color>
</resources>
\ No newline at end of file
res/values/strings.xml
View file @
3d664377
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string
name=
"app_name"
>
shadowsocks
</string>
<string
name=
"app_name"
>
shadowsocks
</string>
<!-- function category -->
<string
name=
"function_cat"
>
Service Controller
</string>
<string
name=
"service_controller"
>
Proxy Switch
</string>
<string
name=
"service_summary"
>
Enable / Disable Proxy
</string>
<!-- function category -->
<string
name=
"function_cat"
>
Service Controller
</string>
<string
name=
"service_controller"
>
Proxy Switch
</string>
<string
name=
"service_summary"
>
Enable / Disable Proxy
</string>
<!-- proxy category -->
<string
name=
"proxy_cat"
>
Shadowsocks Settings
</string>
<string
name=
"proxy"
>
Server
</string>
<string
name=
"proxy_summary"
>
Hostname of your Shadowsocks server
</string>
<string
name=
"remote_port"
>
Remote Port
</string>
<string
name=
"remote_port_summary"
>
Remote port of shadowsocks server.
</string>
<string
name=
"port"
>
Local Port
</string>
<string
name=
"port_summary"
>
Local port listening on
</string>
<string
name=
"sitekey"
>
Password
</string>
<string
name=
"sitekey_summary"
>
Password of your Shadowsocks server
</string>
<string
name=
"enc_method"
>
Encrypt Method
</string>
<array
name=
"enc_method_entry"
>
<item>
Table
</item>
<item>
RC4
</item>
</array>
<array
name=
"enc_method_value"
>
<item>
table
</item>
<item>
rc4
</item>
</array>
<!-- proxy category -->
<string
name=
"proxy_cat"
>
Shadowsocks Settings
</string>
<string
name=
"proxy"
>
Server
</string>
<string
name=
"proxy_summary"
>
Hostname of your Shadowsocks server
</string>
<string
name=
"remote_port"
>
Remote Port
</string>
<string
name=
"remote_port_summary"
>
Remote port of shadowsocks server.
</string>
<string
name=
"port"
>
Local Port
</string>
<string
name=
"port_summary"
>
Local port listening on
</string>
<string
name=
"sitekey"
>
Password
</string>
<string
name=
"sitekey_summary"
>
Password of your Shadowsocks server
</string>
<string
name=
"enc_method"
>
Encrypt Method
</string>
<array
name=
"enc_method_entry"
>
<item>
Table
</item>
<item>
RC4
</item>
</array>
<array
name=
"enc_method_value"
>
<item>
table
</item>
<item>
rc4
</item>
</array>
<!-- feature category -->
<string
name=
"feature_cat"
>
Feature Settings
</string>
<string
name=
"http_proxy"
>
HTTP Proxy
</string>
<string
name=
"http_proxy_summary"
>
Local HTTP Proxy
</string>
<string
name=
"dns_proxy"
>
DNS Proxy
</string>
<string
name=
"dns_proxy_summary"
>
Redirect DNS queries to remote server.
</string>
<string
name=
"auto_set_gfwlist"
>
CHN Route
</string>
<string
name=
"auto_set_gfwlist_summary"
>
Bypass all sites located in China
</string>
<string
name=
"auto_set_proxy"
>
Global Proxy
</string>
<string
name=
"auto_set_proxy_summary"
>
Set up system wide proxy
</string>
<string
name=
"proxied_apps"
>
Individual Proxy
</string>
<string
name=
"proxied_apps_summary"
>
Set individual proxy for apps
</string>
<string
name=
"proxied_help"
>
Select apps to use with Shadowsocks:
</string>
<string
name=
"bypass_apps"
>
Bypass Mode
</string>
<string
name=
"bypass_apps_summary"
>
Enable this option to bypass selected apps
</string>
<string
name=
"auto_connect"
>
Auto Connect
</string>
<string
name=
"auto_connect_summary"
>
Start Shadowsocks at the startup
</string>
<!-- feature category -->
<string
name=
"feature_cat"
>
Feature Settings
</string>
<string
name=
"http_proxy"
>
HTTP Proxy
</string>
<string
name=
"http_proxy_summary"
>
Local HTTP Proxy
</string>
<string
name=
"dns_proxy"
>
DNS Proxy
</string>
<string
name=
"dns_proxy_summary"
>
Redirect DNS queries to remote server.
</string>
<string
name=
"auto_set_gfwlist"
>
CHN Route
</string>
<string
name=
"auto_set_gfwlist_summary"
>
Bypass all sites located in China
</string>
<string
name=
"auto_set_proxy"
>
Global Proxy
</string>
<string
name=
"auto_set_proxy_summary"
>
Set up system wide proxy
</string>
<string
name=
"proxied_apps"
>
Individual Proxy
</string>
<string
name=
"proxied_apps_summary"
>
Set individual proxy for apps
</string>
<string
name=
"proxied_help"
>
Select apps to use with Shadowsocks:
</string>
<string
name=
"bypass_apps"
>
Bypass Mode
</string>
<string
name=
"bypass_apps_summary"
>
Enable this option to bypass selected apps
</string>
<string
name=
"auto_connect"
>
Auto Connect
</string>
<string
name=
"auto_connect_summary"
>
Start Shadowsocks at the startup
</string>
<!-- notification category -->
<string
name=
"forward_success"
>
Shadowsocks started
</string>
<string
name=
"service_running"
>
Running in the background
</string>
<string
name=
"forward_fail"
>
Shadowsocks failed to start
</string>
<string
name=
"service_stopped"
>
Shadowsocks stopped
</string>
<string
name=
"forward_stop"
>
Shadowsocks stopped
</string>
<string
name=
"service_failed"
>
Please check your network status and try again.
</string>
<!-- notification category -->
<string
name=
"forward_success"
>
Shadowsocks started
</string>
<string
name=
"service_running"
>
Running in the background
</string>
<string
name=
"forward_fail"
>
Shadowsocks failed to start
</string>
<string
name=
"service_stopped"
>
Shadowsocks stopped
</string>
<string
name=
"forward_stop"
>
Shadowsocks stopped
</string>
<string
name=
"service_failed"
>
Please check your network status and try again.
</string>
<!-- alert category -->
<string
name=
"ok_iknow"
>
OK
</string>
<string
name=
"port_alert"
>
The port number should be greater than 1024
</string>
<string
name=
"port_empty"
>
Port should not be empty
</string>
<string
name=
"proxy_empty"
>
Proxy should not be empty
</string>
<string
name=
"crash_alert"
>
An unexpected exit detected, context has been recovered
</string>
<string
name=
"connecting"
>
Connecting…
</string>
<string
name=
"initializing"
>
Initializing…
</string>
<string
name=
"recovering"
>
Reseting…
</string>
<string
name=
"loading"
>
Loading app list…
</string>
<!-- alert category -->
<string
name=
"ok_iknow"
>
OK
</string>
<string
name=
"port_alert"
>
The port number should be greater than 1024
</string>
<string
name=
"port_empty"
>
Port should not be empty
</string>
<string
name=
"proxy_empty"
>
Proxy should not be empty
</string>
<string
name=
"crash_alert"
>
An unexpected exit detected, context has been recovered
</string>
<string
name=
"connecting"
>
Connecting…
</string>
<string
name=
"initializing"
>
Initializing…
</string>
<string
name=
"recovering"
>
Reseting…
</string>
<string
name=
"loading"
>
Loading app list…
</string>
<!-- menu category -->
<string
name=
"recovery"
>
Reset
</string>
<string
name=
"about"
>
About
</string>
<string
name=
"copy_rights"
>
Shadowsocks is an open source socks proxy.\n\nYou can find more details
here:\ngithub.com/shadowsocks
</string>
<!-- menu category -->
<string
name=
"recovery"
>
Reset
</string>
<string
name=
"about"
>
About
</string>
<string
name=
"copy_rights"
>
Shadowsocks is an open source socks proxy.\n\nYou can find more details
here:\ngithub.com/shadowsocks
</string>
<!-- array category -->
<string-array
name=
"chn_list"
>
<item>
0.0.0.0/7
</item>
<item>
10.0.0.0/8
</item>
<item>
14.0.0.0/8
</item>
<item>
27.0.0.0/8
</item>
<item>
36.0.0.0/8
</item>
<item>
39.0.0.0/8
</item>
<item>
42.0.0.0/7
</item>
<item>
49.0.0.0/8
</item>
<item>
58.0.0.0/7
</item>
<item>
60.0.0.0/7
</item>
<item>
101.0.0.0/8
</item>
<item>
103.0.0.0/8
</item>
<item>
106.0.0.0/8
</item>
<item>
110.0.0.0/7
</item>
<item>
112.0.0.0/4
</item>
<item>
134.128.0.0/9
</item>
<item>
139.0.0.0/9
</item>
<item>
139.128.0.0/9
</item>
<item>
140.0.0.0/9
</item>
<item>
140.128.0.0/9
</item>
<item>
144.0.0.0/9
</item>
<item>
144.128.0.0/9
</item>
<item>
150.0.0.0/8
</item>
<item>
153.0.0.0/8
</item>
<item>
157.0.0.0/9
</item>
<item>
157.128.0.0/9
</item>
<item>
159.128.0.0/9
</item>
<item>
161.128.0.0/9
</item>
<item>
162.0.0.0/9
</item>
<item>
163.0.0.0/8
</item>
<item>
166.0.0.0/9
</item>
<item>
167.128.0.0/9
</item>
<item>
168.128.0.0/9
</item>
<item>
171.0.0.0/8
</item>
<item>
172.0.0.0/12
</item>
<item>
175.0.0.0/8
</item>
<item>
180.0.0.0/8
</item>
<item>
182.0.0.0/7
</item>
<item>
192.112.0.0/12
</item>
<item>
192.128.0.0/9
</item>
<item>
202.0.0.0/7
</item>
<item>
210.0.0.0/7
</item>
<item>
218.0.0.0/7
</item>
<item>
220.0.0.0/6
</item>
</string-array>
<!-- array category -->
<string-array
name=
"chn_list"
>
<item>
0.0.0.0/7
</item>
<item>
10.0.0.0/8
</item>
<item>
14.0.0.0/8
</item>
<item>
27.0.0.0/8
</item>
<item>
36.0.0.0/8
</item>
<item>
39.0.0.0/8
</item>
<item>
42.0.0.0/7
</item>
<item>
49.0.0.0/8
</item>
<item>
58.0.0.0/7
</item>
<item>
60.0.0.0/7
</item>
<item>
101.0.0.0/8
</item>
<item>
103.0.0.0/8
</item>
<item>
106.0.0.0/8
</item>
<item>
110.0.0.0/7
</item>
<item>
112.0.0.0/4
</item>
<item>
134.128.0.0/9
</item>
<item>
139.0.0.0/9
</item>
<item>
139.128.0.0/9
</item>
<item>
140.0.0.0/9
</item>
<item>
140.128.0.0/9
</item>
<item>
144.0.0.0/9
</item>
<item>
144.128.0.0/9
</item>
<item>
150.0.0.0/8
</item>
<item>
153.0.0.0/8
</item>
<item>
157.0.0.0/9
</item>
<item>
157.128.0.0/9
</item>
<item>
159.128.0.0/9
</item>
<item>
161.128.0.0/9
</item>
<item>
162.0.0.0/9
</item>
<item>
163.0.0.0/8
</item>
<item>
166.0.0.0/9
</item>
<item>
167.128.0.0/9
</item>
<item>
168.128.0.0/9
</item>
<item>
171.0.0.0/8
</item>
<item>
172.0.0.0/12
</item>
<item>
175.0.0.0/8
</item>
<item>
180.0.0.0/8
</item>
<item>
182.0.0.0/7
</item>
<item>
192.112.0.0/12
</item>
<item>
192.128.0.0/9
</item>
<item>
202.0.0.0/7
</item>
<item>
210.0.0.0/7
</item>
<item>
218.0.0.0/7
</item>
<item>
220.0.0.0/6
</item>
</string-array>
</resources>
res/values/styles_shadow.xml
View file @
3d664377
...
...
@@ -19,64 +19,66 @@
<resources>
<style
name=
"Theme.Shadow"
parent=
"@style/Theme.Sherlock.Light.DarkActionBar"
>
<item
name=
"actionBarItemBackground"
>
@drawable/selectable_background_shadow
</item>
<item
name=
"popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
<item
name=
"actionBarTabStyle"
>
@style/ActionBarTabStyle.Shadow
</item>
<item
name=
"actionDropDownStyle"
>
@style/DropDownNav.Shadow
</item>
<item
name=
"actionBarStyle"
>
@style/ActionBar.Solid.Shadow
</item>
<item
name=
"actionModeBackground"
>
@drawable/cab_background_top_shadow
</item>
<item
name=
"actionModeSplitBackground"
>
@drawable/cab_background_bottom_shadow
</item>
<item
name=
"actionModeCloseButtonStyle"
>
@style/ActionButton.CloseMode.Shadow
</item>
<!-- Light.DarkActionBar specific -->
<item
name=
"actionBarWidgetTheme"
>
@style/Theme.Shadow.Widget
</item>
</style>
<style
name=
"ActionBar.Solid.Shadow"
parent=
"@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse"
>
<item
name=
"background"
>
@drawable/ab_solid_shadow
</item>
<item
name=
"backgroundStacked"
>
@drawable/ab_stacked_solid_shadow
</item>
<item
name=
"backgroundSplit"
>
@drawable/ab_bottom_solid_shadow
</item>
<item
name=
"progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<style
name=
"ActionBar.Transparent.Shadow"
parent=
"@style/Widget.Sherlock.ActionBar"
>
<item
name=
"background"
>
@drawable/ab_transparent_shadow
</item>
<item
name=
"progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<style
name=
"PopupMenu.Shadow"
parent=
"@style/Widget.Sherlock.ListPopupWindow"
>
<item
name=
"android:popupBackground"
>
@drawable/menu_dropdown_panel_shadow
</item>
</style>
<style
name=
"DropDownListView.Shadow"
parent=
"@style/Widget.Sherlock.ListView.DropDown"
>
<item
name=
"android:listSelector"
>
@drawable/selectable_background_shadow
</item>
</style>
<style
name=
"ActionBarTabStyle.Shadow"
parent=
"@style/Widget.Sherlock.ActionBar.TabView"
>
<item
name=
"android:background"
>
@drawable/tab_indicator_ab_shadow
</item>
</style>
<style
name=
"DropDownNav.Shadow"
parent=
"@style/Widget.Sherlock.Spinner.DropDown.ActionBar"
>
<item
name=
"android:background"
>
@drawable/spinner_background_ab_shadow
</item>
<item
name=
"android:popupBackground"
>
@drawable/menu_dropdown_panel_shadow
</item>
<item
name=
"android:dropDownSelector"
>
@drawable/selectable_background_shadow
</item>
</style>
<style
name=
"ProgressBar.Shadow"
parent=
"@style/Widget.Sherlock.ProgressBar.Horizontal"
>
<item
name=
"android:progressDrawable"
>
@drawable/progress_horizontal_shadow
</item>
</style>
<style
name=
"ActionButton.CloseMode.Shadow"
parent=
"@style/Widget.Sherlock.ActionButton.CloseMode"
>
<item
name=
"android:background"
>
@drawable/btn_cab_done_shadow
</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style
name=
"Theme.Shadow.Widget"
parent=
"@style/Theme.Sherlock"
>
<item
name=
"popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
</style>
<style
name=
"Theme.Shadow"
parent=
"@style/Theme.Sherlock.Light.DarkActionBar"
>
<item
name=
"actionBarItemBackground"
>
@drawable/selectable_background_shadow
</item>
<item
name=
"popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
<item
name=
"actionBarTabStyle"
>
@style/ActionBarTabStyle.Shadow
</item>
<item
name=
"actionDropDownStyle"
>
@style/DropDownNav.Shadow
</item>
<item
name=
"actionBarStyle"
>
@style/ActionBar.Solid.Shadow
</item>
<item
name=
"actionModeBackground"
>
@drawable/cab_background_top_shadow
</item>
<item
name=
"actionModeSplitBackground"
>
@drawable/cab_background_bottom_shadow
</item>
<item
name=
"actionModeCloseButtonStyle"
>
@style/ActionButton.CloseMode.Shadow
</item>
<!-- Light.DarkActionBar specific -->
<item
name=
"actionBarWidgetTheme"
>
@style/Theme.Shadow.Widget
</item>
</style>
<style
name=
"ActionBar.Solid.Shadow"
parent=
"@style/Widget.Sherlock.Light.ActionBar.Solid.Inverse"
>
<item
name=
"background"
>
@drawable/ab_solid_shadow
</item>
<item
name=
"backgroundStacked"
>
@drawable/ab_stacked_solid_shadow
</item>
<item
name=
"backgroundSplit"
>
@drawable/ab_bottom_solid_shadow
</item>
<item
name=
"progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<style
name=
"ActionBar.Transparent.Shadow"
parent=
"@style/Widget.Sherlock.ActionBar"
>
<item
name=
"background"
>
@drawable/ab_transparent_shadow
</item>
<item
name=
"progressBarStyle"
>
@style/ProgressBar.Shadow
</item>
</style>
<style
name=
"PopupMenu.Shadow"
parent=
"@style/Widget.Sherlock.ListPopupWindow"
>
<item
name=
"android:popupBackground"
>
@drawable/menu_dropdown_panel_shadow
</item>
</style>
<style
name=
"DropDownListView.Shadow"
parent=
"@style/Widget.Sherlock.ListView.DropDown"
>
<item
name=
"android:listSelector"
>
@drawable/selectable_background_shadow
</item>
</style>
<style
name=
"ActionBarTabStyle.Shadow"
parent=
"@style/Widget.Sherlock.ActionBar.TabView"
>
<item
name=
"android:background"
>
@drawable/tab_indicator_ab_shadow
</item>
</style>
<style
name=
"DropDownNav.Shadow"
parent=
"@style/Widget.Sherlock.Spinner.DropDown.ActionBar"
>
<item
name=
"android:background"
>
@drawable/spinner_background_ab_shadow
</item>
<item
name=
"android:popupBackground"
>
@drawable/menu_dropdown_panel_shadow
</item>
<item
name=
"android:dropDownSelector"
>
@drawable/selectable_background_shadow
</item>
</style>
<style
name=
"ProgressBar.Shadow"
parent=
"@style/Widget.Sherlock.ProgressBar.Horizontal"
>
<item
name=
"android:progressDrawable"
>
@drawable/progress_horizontal_shadow
</item>
</style>
<style
name=
"ActionButton.CloseMode.Shadow"
parent=
"@style/Widget.Sherlock.ActionButton.CloseMode"
>
<item
name=
"android:background"
>
@drawable/btn_cab_done_shadow
</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style
name=
"Theme.Shadow.Widget"
parent=
"@style/Theme.Sherlock"
>
<item
name=
"popupMenuStyle"
>
@style/PopupMenu.Shadow
</item>
<item
name=
"dropDownListViewStyle"
>
@style/DropDownListView.Shadow
</item>
</style>
</resources>
\ No newline at end of file
res/xml/pref_feature.xml
View file @
3d664377
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<CheckBoxPreference
android:defaultValue=
"false"
android:key=
"isHTTPProxy"
android:summary=
"@string/http_proxy_summary"
android:title=
"@string/http_proxy"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"true"
android:key=
"isDNSProxy"
android:summary=
"@string/dns_proxy_summary"
android:title=
"@string/dns_proxy"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"true"
android:key=
"isGFWList"
android:summary=
"@string/auto_set_gfwlist_summary"
android:title=
"@string/auto_set_gfwlist"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"true"
android:key=
"isGlobalProxy"
android:disableDependentsState=
"true"
android:summary=
"@string/auto_set_proxy_summary"
android:title=
"@string/auto_set_proxy"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"false"
android:dependency=
"isGlobalProxy"
android:key=
"isBypassApps"
android:summary=
"@string/bypass_apps_summary"
android:title=
"@string/bypass_apps"
>
</CheckBoxPreference>
<Preference
android:key=
"proxyedApps"
android:dependency=
"isGlobalProxy"
android:summary=
"@string/proxied_apps_summary"
android:title=
"@string/proxied_apps"
>
<intent
android:action=
"com.github.shadowsocks.AppManager"
/>
</Preference>
<CheckBoxPreference
android:key=
"isAutoConnect"
android:summary=
"@string/auto_connect_summary"
android:title=
"@string/auto_connect"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"false"
android:key=
"isHTTPProxy"
android:summary=
"@string/http_proxy_summary"
android:title=
"@string/http_proxy"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"true"
android:key=
"isDNSProxy"
android:summary=
"@string/dns_proxy_summary"
android:title=
"@string/dns_proxy"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"true"
android:key=
"isGFWList"
android:summary=
"@string/auto_set_gfwlist_summary"
android:title=
"@string/auto_set_gfwlist"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"true"
android:key=
"isGlobalProxy"
android:disableDependentsState=
"true"
android:summary=
"@string/auto_set_proxy_summary"
android:title=
"@string/auto_set_proxy"
>
</CheckBoxPreference>
<CheckBoxPreference
android:defaultValue=
"false"
android:dependency=
"isGlobalProxy"
android:key=
"isBypassApps"
android:summary=
"@string/bypass_apps_summary"
android:title=
"@string/bypass_apps"
>
</CheckBoxPreference>
<Preference
android:key=
"proxyedApps"
android:dependency=
"isGlobalProxy"
android:summary=
"@string/proxied_apps_summary"
android:title=
"@string/proxied_apps"
>
<intent
android:action=
"com.github.shadowsocks.AppManager"
/>
</Preference>
<CheckBoxPreference
android:key=
"isAutoConnect"
android:summary=
"@string/auto_connect_summary"
android:title=
"@string/auto_connect"
>
</CheckBoxPreference>
</PreferenceScreen>
res/xml/pref_proxy.xml
View file @
3d664377
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"198.199.101.152"
android:key=
"proxy"
android:summary=
"@string/proxy_summary"
android:title=
"@string/proxy"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"443"
android:key=
"remotePort"
android:summary=
"@string/remote_port_summary"
android:title=
"@string/remote_port"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"1080"
android:key=
"port"
android:summary=
"@string/port_summary"
android:title=
"@string/port"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"u1rRWTssNv0p"
android:key=
"sitekey"
android:summary=
"@string/sitekey_summary"
android:title=
"@string/sitekey"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<ListPreference
android:defaultValue=
"rc4"
android:key=
"encMethod"
android:entries=
"@array/enc_method_entry"
android:entryValues=
"@array/enc_method_value"
android:title=
"@string/enc_method"
>
</ListPreference>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"198.199.101.152"
android:key=
"proxy"
android:summary=
"@string/proxy_summary"
android:title=
"@string/proxy"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"443"
android:key=
"remotePort"
android:summary=
"@string/remote_port_summary"
android:title=
"@string/remote_port"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"1080"
android:key=
"port"
android:summary=
"@string/port_summary"
android:title=
"@string/port"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<com.github.shadowsocks.preferences.SummaryEditTextPreference
android:defaultValue=
"u1rRWTssNv0p"
android:key=
"sitekey"
android:summary=
"@string/sitekey_summary"
android:title=
"@string/sitekey"
>
</com.github.shadowsocks.preferences.SummaryEditTextPreference>
<ListPreference
android:defaultValue=
"rc4"
android:key=
"encMethod"
android:entries=
"@array/enc_method_entry"
android:entryValues=
"@array/enc_method_value"
android:title=
"@string/enc_method"
>
</ListPreference>
</PreferenceScreen>
res/xml/shadowsocks_headers.xml
View file @
3d664377
<?xml version="1.0" encoding="utf-8"?>
<preference-headers
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:unified=
"http://schemas.android.com/apk/res-auto"
>
<preference-headers
xmlns:unified=
"http://schemas.android.com/apk/res-auto"
>
<header
unified:fragment=
"com.github.shadowsocks.Shadowsocks$ProxyFragment"
unified:title=
"@string/proxy_cat"
unified:preferenceRes=
"@xml/pref_proxy"
/>
<header
unified:fragment=
"com.github.shadowsocks.Shadowsocks$FeatureFragment"
unified:title=
"@string/feature_cat"
unified:preferenceRes=
"@xml/pref_feature"
/>
<header
unified:fragment=
"com.github.shadowsocks.Shadowsocks$ProxyFragment"
unified:title=
"@string/proxy_cat"
unified:preferenceRes=
"@xml/pref_proxy"
/>
<header
unified:fragment=
"com.github.shadowsocks.Shadowsocks$FeatureFragment"
unified:title=
"@string/feature_cat"
unified:preferenceRes=
"@xml/pref_feature"
/>
</preference-headers>
\ No newline at end of file
src/com/github/shadowsocks/AppManager.java
View file @
3d664377
This diff is collapsed.
Click to expand it.
src/com/github/shadowsocks/Exec.java
View file @
3d664377
...
...
@@ -27,46 +27,41 @@ import java.io.FileDescriptor;
*/
public
class
Exec
{
static
{
java
.
lang
.
System
.
loadLibrary
(
"exec"
);
}
static
{
java
.
lang
.
System
.
loadLibrary
(
"exec"
);
}
/**
* Close a given file descriptor.
*/
public
static
native
void
close
(
FileDescriptor
fd
);
/** Close a given file descriptor. */
public
static
native
void
close
(
FileDescriptor
fd
);
/**
* Create a subprocess. Differs from java.lang.ProcessBuilder in that a pty
* is used to communicate with the subprocess.
* <p/>
* Callers are responsible for calling Exec.close() on the returned file
* descriptor.
*
* @param rdt Whether redirect stdout and stderr
* @param cmd The command to execute.
* @param args An array of arguments to the command.
* @param envVars An array of strings of the form "VAR=value" to be added to the
* environment of the process.
* @param scripts The scripts to execute.
* @param processId A one-element array to which the process ID of the started
* process will be written.
* @return File descriptor
*/
public
static
native
FileDescriptor
createSubprocess
(
int
rdt
,
String
cmd
,
String
[]
args
,
String
[]
envVars
,
String
scripts
,
int
[]
processId
);
/**
* Create a subprocess. Differs from java.lang.ProcessBuilder in that a pty
* is used to communicate with the subprocess.
* <p/>
* Callers are responsible for calling Exec.close() on the returned file
* descriptor.
*
* @param rdt Whether redirect stdout and stderr
* @param cmd The command to execute.
* @param args An array of arguments to the command.
* @param envVars An array of strings of the form "VAR=value" to be added to the
* environment of the process.
* @param scripts The scripts to execute.
* @param processId A one-element array to which the process ID of the started
* process will be written.
* @return File descriptor
*/
public
static
native
FileDescriptor
createSubprocess
(
int
rdt
,
String
cmd
,
String
[]
args
,
String
[]
envVars
,
String
scripts
,
int
[]
processId
);
/**
* Send SIGHUP to a process group.
*/
public
static
native
void
hangupProcessGroup
(
int
processId
);
/** Send SIGHUP to a process group. */
public
static
native
void
hangupProcessGroup
(
int
processId
);
/**
* Causes the calling thread to wait for the process associated with the
* receiver to finish executing.
*
* @return The exit value of the Process being waited on
*/
public
static
native
int
waitFor
(
int
processId
);
/**
* Causes the calling thread to wait for the process associated with the
* receiver to finish executing.
*
* @return The exit value of the Process being waited on
*/
public
static
native
int
waitFor
(
int
processId
);
}
src/com/github/shadowsocks/ImageLoader.java
View file @
3d664377
This diff is collapsed.
Click to expand it.
src/com/github/shadowsocks/ImageLoaderFactory.java
View file @
3d664377
...
...
@@ -42,12 +42,12 @@ import android.content.Context;
public
class
ImageLoaderFactory
{
private
static
ImageLoader
il
=
null
;
private
static
ImageLoader
il
=
null
;
public
static
ImageLoader
getImageLoader
(
Context
context
)
{
if
(
il
==
null
)
{
il
=
new
ImageLoader
(
context
);
}
return
il
;
public
static
ImageLoader
getImageLoader
(
Context
context
)
{
if
(
il
==
null
)
{
il
=
new
ImageLoader
(
context
);
}
return
il
;
}
}
src/com/github/shadowsocks/ProxyedApp.java
View file @
3d664377
...
...
@@ -40,94 +40,70 @@ package com.github.shadowsocks;
public
class
ProxyedApp
{
private
boolean
enabled
;
private
int
uid
;
private
String
username
;
private
String
procname
;
private
String
name
;
private
boolean
proxyed
=
false
;
private
boolean
enabled
;
private
int
uid
;
private
String
username
;
private
String
procname
;
private
String
name
;
private
boolean
proxyed
=
false
;
/**
* @return the name
*/
public
String
getName
()
{
return
name
;
}
/** @return the name */
public
String
getName
()
{
return
name
;
}
/**
* @param name the name to set
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/** @param name the name to set */
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/**
* @return the procname
*/
public
String
getProcname
()
{
return
procname
;
}
/** @return the procname */
public
String
getProcname
()
{
return
procname
;
}
/**
* @param procname the procname to set
*/
public
void
setProcname
(
String
procname
)
{
this
.
procname
=
procname
;
}
/** @param procname the procname to set */
public
void
setProcname
(
String
procname
)
{
this
.
procname
=
procname
;
}
/**
* @return the uid
*/
public
int
getUid
()
{
return
uid
;
}
/** @return the uid */
public
int
getUid
()
{
return
uid
;
}
/**
* @param uid the uid to set
*/
public
void
setUid
(
int
uid
)
{
this
.
uid
=
uid
;
}
/** @param uid the uid to set */
public
void
setUid
(
int
uid
)
{
this
.
uid
=
uid
;
}
/**
* @return the username
*/
public
String
getUsername
()
{
return
username
;
}
/** @return the username */
public
String
getUsername
()
{
return
username
;
}
/**
* @param username the username to set
*/
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
/** @param username the username to set */
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
/**
* @return the enabled
*/
public
boolean
isEnabled
()
{
return
enabled
;
}
/** @return the enabled */
public
boolean
isEnabled
()
{
return
enabled
;
}
/**
* @param enabled the enabled to set
*/
public
void
setEnabled
(
boolean
enabled
)
{
this
.
enabled
=
enabled
;
}
/** @param enabled the enabled to set */
public
void
setEnabled
(
boolean
enabled
)
{
this
.
enabled
=
enabled
;
}
/**
* @return the proxyed
*/
public
boolean
isProxyed
()
{
return
proxyed
;
}
/** @return the proxyed */
public
boolean
isProxyed
()
{
return
proxyed
;
}
/**
* @param proxyed the proxyed to set
*/
public
void
setProxyed
(
boolean
proxyed
)
{
this
.
proxyed
=
proxyed
;
}
/** @param proxyed the proxyed to set */
public
void
setProxyed
(
boolean
proxyed
)
{
this
.
proxyed
=
proxyed
;
}
}
src/com/github/shadowsocks/Shadowsocks.java
View file @
3d664377
This diff is collapsed.
Click to expand it.
src/com/github/shadowsocks/ShadowsocksApplication.java
View file @
3d664377
...
...
@@ -43,16 +43,15 @@ import com.google.analytics.tracking.android.EasyTracker;
public
class
ShadowsocksApplication
extends
Application
{
private
static
String
sTmpDir
;
private
static
String
sTmpDir
;
public
static
String
getTmpDir
()
{
return
sTmpDir
;
}
@Override
public
void
onCreate
()
{
EasyTracker
.
getInstance
().
setContext
(
this
);
sTmpDir
=
getCacheDir
().
getAbsolutePath
();
}
public
static
String
getTmpDir
()
{
return
sTmpDir
;
}
@Override
public
void
onCreate
()
{
EasyTracker
.
getInstance
().
setContext
(
this
);
sTmpDir
=
getCacheDir
().
getAbsolutePath
();
}
}
src/com/github/shadowsocks/ShadowsocksReceiver.java
View file @
3d664377
...
...
@@ -47,47 +47,47 @@ import android.preference.PreferenceManager;
public
class
ShadowsocksReceiver
extends
BroadcastReceiver
{
private
static
final
String
TAG
=
"Shadowsocks"
;
private
static
final
String
TAG
=
"Shadowsocks"
;
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
if
(
intent
!=
null
)
{
final
String
action
=
intent
.
getAction
();
if
(
action
.
equals
(
Intent
.
ACTION_SHUTDOWN
))
{
context
.
stopService
(
new
Intent
(
context
,
ShadowsocksService
.
class
));
return
;
}
}
SharedPreferences
settings
=
PreferenceManager
.
getDefaultSharedPreferences
(
context
);
String
versionName
;
try
{
versionName
=
context
.
getPackageManager
().
getPackageInfo
(
context
.
getPackageName
(),
0
).
versionName
;
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
versionName
=
"NONE"
;
}
if
(
intent
!=
null
)
{
final
String
action
=
intent
.
getAction
();
if
(
action
.
equals
(
Intent
.
ACTION_SHUTDOWN
))
{
context
.
stopService
(
new
Intent
(
context
,
ShadowsocksService
.
class
));
return
;
}
}
final
boolean
isAutoConnect
=
settings
.
getBoolean
(
"isAutoConnect"
,
false
);
final
boolean
isInstalled
=
settings
.
getBoolean
(
versionName
,
false
);
SharedPreferences
settings
=
PreferenceManager
.
getDefaultSharedPreferences
(
context
);
String
versionName
;
try
{
versionName
=
context
.
getPackageManager
().
getPackageInfo
(
context
.
getPackageName
(),
0
).
versionName
;
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
versionName
=
"NONE"
;
}
if
(
isAutoConnect
&&
isInstalled
)
{
final
String
portText
=
settings
.
getString
(
"port"
,
""
);
if
(
portText
==
null
||
portText
.
length
()
<=
0
)
{
return
;
}
try
{
int
port
=
Integer
.
valueOf
(
portText
);
if
(
port
<=
1024
)
{
return
;
}
}
catch
(
Exception
e
)
{
return
;
}
final
boolean
isAutoConnect
=
settings
.
getBoolean
(
"isAutoConnect"
,
false
);
final
boolean
isInstalled
=
settings
.
getBoolean
(
versionName
,
false
);
Intent
it
=
new
Intent
(
context
,
ShadowsocksService
.
class
);
context
.
startService
(
it
);
if
(
isAutoConnect
&&
isInstalled
)
{
final
String
portText
=
settings
.
getString
(
"port"
,
""
);
if
(
portText
==
null
||
portText
.
length
()
<=
0
)
{
return
;
}
try
{
int
port
=
Integer
.
valueOf
(
portText
);
if
(
port
<=
1024
)
{
return
;
}
}
}
catch
(
Exception
e
)
{
return
;
}
Intent
it
=
new
Intent
(
context
,
ShadowsocksService
.
class
);
context
.
startService
(
it
);
}
}
}
src/com/github/shadowsocks/ShadowsocksService.java
View file @
3d664377
This diff is collapsed.
Click to expand it.
src/com/github/shadowsocks/System.java
View file @
3d664377
...
...
@@ -39,9 +39,9 @@
package
com.github.shadowsocks
;
public
class
System
{
static
{
java
.
lang
.
System
.
loadLibrary
(
"system"
);
}
static
{
java
.
lang
.
System
.
loadLibrary
(
"system"
);
}
public
static
native
void
exec
(
String
cmd
);
public
static
native
void
exec
(
String
cmd
);
}
src/com/github/shadowsocks/Utils.java
View file @
3d664377
This diff is collapsed.
Click to expand it.
src/com/github/shadowsocks/preferences/SummaryEditTextPreference.java
View file @
3d664377
...
...
@@ -3,36 +3,31 @@ package com.github.shadowsocks.preferences;
import
android.content.Context
;
import
android.preference.EditTextPreference
;
import
android.util.AttributeSet
;
import
com.github.shadowsocks.R
;
public
class
SummaryEditTextPreference
extends
EditTextPreference
{
private
CharSequence
mDefaultSummary
;
private
CharSequence
mDefaultSummary
;
public
SummaryEditTextPreference
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
mDefaultSummary
=
getSummary
();
}
public
SummaryEditTextPreference
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
mDefaultSummary
=
getSummary
();
}
public
SummaryEditTextPreference
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
mDefaultSummary
=
getSummary
();
}
public
SummaryEditTextPreference
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
mDefaultSummary
=
getSummary
();
}
public
SummaryEditTextPreference
(
Context
context
)
{
super
(
context
);
}
public
SummaryEditTextPreference
(
Context
context
)
{
super
(
context
);
}
@Override
public
void
onDialogClosed
(
boolean
positiveResult
)
{
super
.
onDialogClosed
(
positiveResult
);
if
(
positiveResult
)
{
String
value
=
getEditText
().
getText
().
toString
();
if
(
value
.
isEmpty
())
{
setSummary
(
mDefaultSummary
);
}
else
{
setSummary
(
value
);
}
}
@Override
public
void
setSummary
(
CharSequence
summary
)
{
if
(
summary
.
toString
().
isEmpty
())
{
super
.
setSummary
(
mDefaultSummary
);
}
else
{
super
.
setSummary
(
summary
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment