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
a03a1b57
Commit
a03a1b57
authored
Mar 07, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix a bypass issue"
This reverts commit
4bf784fd
.
parent
5aab822d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
15 deletions
+6
-15
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+2
-2
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+2
-2
src/main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
...main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
+1
-1
src/main/scala/com/github/shadowsocks/utils/Utils.scala
src/main/scala/com/github/shadowsocks/utils/Utils.scala
+1
-10
No files found.
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
a03a1b57
...
@@ -118,7 +118,7 @@ class ShadowsocksNatService extends Service with BaseService {
...
@@ -118,7 +118,7 @@ class ShadowsocksNatService extends Service with BaseService {
Path
.
BASE
+
"ss-local.pid"
)
Path
.
BASE
+
"ss-local.pid"
)
.
format
(
config
.
proxy
,
config
.
remotePort
,
8153
,
config
.
sitekey
,
config
.
encMethod
)
.
format
(
config
.
proxy
,
config
.
remotePort
,
8153
,
config
.
sitekey
,
config
.
encMethod
)
}
else
{
}
else
{
val
conf
=
ConfigUtils
.
PDNSD
.
format
(
"127.0.0.1"
,
getString
(
R
.
string
.
exclude
),
Utils
.
getDNS
);
val
conf
=
ConfigUtils
.
PDNSD
.
format
(
"127.0.0.1"
,
getString
(
R
.
string
.
exclude
),
System
.
getDNS1
);
ConfigUtils
.
printToFile
(
new
File
(
Path
.
BASE
+
"pdnsd.conf"
))(
p
=>
{
ConfigUtils
.
printToFile
(
new
File
(
Path
.
BASE
+
"pdnsd.conf"
))(
p
=>
{
p
.
println
(
conf
)
p
.
println
(
conf
)
})
})
...
@@ -310,8 +310,8 @@ class ShadowsocksNatService extends Service with BaseService {
...
@@ -310,8 +310,8 @@ class ShadowsocksNatService extends Service with BaseService {
// Bypass DNS servers
// Bypass DNS servers
init_sb
.
append
(
cmd_bypass
.
replace
(
"0.0.0.0"
,
"127.0.0.1"
))
init_sb
.
append
(
cmd_bypass
.
replace
(
"0.0.0.0"
,
"127.0.0.1"
))
init_sb
.
append
(
cmd_bypass
.
replace
(
"0.0.0.0"
,
Utils
.
getDNS
))
init_sb
.
append
(
cmd_bypass
.
replace
(
"0.0.0.0"
,
"114.114.114.114"
))
init_sb
.
append
(
cmd_bypass
.
replace
(
"0.0.0.0"
,
"114.114.114.114"
))
init_sb
.
append
(
cmd_bypass
.
replace
(
"0.0.0.0"
,
"114.114.115.115"
))
if
(
hasRedirectSupport
)
{
if
(
hasRedirectSupport
)
{
init_sb
init_sb
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
a03a1b57
...
@@ -91,7 +91,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -91,7 +91,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
Path
.
BASE
+
"ss-tunnel.pid"
)
Path
.
BASE
+
"ss-tunnel.pid"
)
.
format
(
config
.
proxy
,
config
.
remotePort
,
8153
,
config
.
sitekey
,
config
.
encMethod
)
.
format
(
config
.
proxy
,
config
.
remotePort
,
8153
,
config
.
sitekey
,
config
.
encMethod
)
}
else
{
}
else
{
val
conf
=
ConfigUtils
.
PDNSD
.
format
(
"0.0.0.0"
,
getString
(
R
.
string
.
exclude
),
Utils
.
getDNS
)
val
conf
=
ConfigUtils
.
PDNSD
.
format
(
"0.0.0.0"
,
getString
(
R
.
string
.
exclude
),
System
.
getDNS1
)
ConfigUtils
.
printToFile
(
new
File
(
Path
.
BASE
+
"pdnsd.conf"
))(
p
=>
{
ConfigUtils
.
printToFile
(
new
File
(
Path
.
BASE
+
"pdnsd.conf"
))(
p
=>
{
p
.
println
(
conf
)
p
.
println
(
conf
)
})
})
...
@@ -115,7 +115,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -115,7 +115,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
def
isByass
(
util
:
SubnetUtils
)
:
Boolean
=
{
def
isByass
(
util
:
SubnetUtils
)
:
Boolean
=
{
val
info
=
util
.
getInfo
val
info
=
util
.
getInfo
info
.
isInRange
(
config
.
proxy
)
||
info
.
isInRange
(
"114.114.114.114"
)
||
info
.
isInRange
(
Utils
.
getDNS
)
info
.
isInRange
(
config
.
proxy
)
||
info
.
isInRange
(
"114.114.114.114"
)
||
info
.
isInRange
(
"114.114.115.115"
)
}
}
def
startVpn
()
{
def
startVpn
()
{
...
...
src/main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
View file @
a03a1b57
...
@@ -86,7 +86,7 @@ object ConfigUtils {
...
@@ -86,7 +86,7 @@ object ConfigUtils {
|
|
|server {
|server {
| label = "china-servers";
| label = "china-servers";
| ip = %s, 114.114.114.114;
| ip = %s, 114.114.114.114
, 114.114.115.115
;
| timeout = 5;
| timeout = 5;
|}
|}
|
|
...
...
src/main/scala/com/github/shadowsocks/utils/Utils.scala
View file @
a03a1b57
...
@@ -53,7 +53,7 @@ import android.os.Build
...
@@ -53,7 +53,7 @@ import android.os.Build
import
android.provider.Settings
import
android.provider.Settings
import
scala.Some
import
scala.Some
import
java.security.MessageDigest
import
java.security.MessageDigest
import
com.github.shadowsocks.
{
BuildConfig
,
System
}
import
com.github.shadowsocks.
{
BuildConfig
}
object
Utils
{
object
Utils
{
...
@@ -80,15 +80,6 @@ object Utils {
...
@@ -80,15 +80,6 @@ object Utils {
var
data_path
:
String
=
null
var
data_path
:
String
=
null
var
rootTries
=
0
var
rootTries
=
0
def
getDNS
()
:
String
=
{
val
dns1
=
System
.
getDNS1
if
(
dns1
!=
null
&&
!
dns1
.
isEmpty
&&
InetAddressUtils
.
isIPv4Address
(
dns1
))
{
dns1
}
else
{
"114.114.114.114"
}
}
def
getSignature
(
context
:
Context
)
:
String
=
{
def
getSignature
(
context
:
Context
)
:
String
=
{
val
info
=
context
val
info
=
context
.
getPackageManager
.
getPackageManager
...
...
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