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
f43362fb
Commit
f43362fb
authored
Feb 25, 2017
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix overture with NAT mode
parent
4f0e527d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
mobile/src/main/jni/overture/armeabi-v7a/liboverture.so
mobile/src/main/jni/overture/armeabi-v7a/liboverture.so
+0
-0
mobile/src/main/jni/overture/x86/liboverture.so
mobile/src/main/jni/overture/x86/liboverture.so
+0
-0
mobile/src/main/scala/com/github/shadowsocks/BaseService.scala
...e/src/main/scala/com/github/shadowsocks/BaseService.scala
+6
-2
mobile/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+2
-2
No files found.
mobile/src/main/jni/overture/armeabi-v7a/liboverture.so
View file @
f43362fb
No preview for this file type
mobile/src/main/jni/overture/x86/liboverture.so
View file @
f43362fb
No preview for this file type
mobile/src/main/scala/com/github/shadowsocks/BaseService.scala
View file @
f43362fb
...
@@ -123,7 +123,7 @@ trait BaseService extends Service {
...
@@ -123,7 +123,7 @@ trait BaseService extends Service {
false
false
}
else
true
}
else
true
def
getExternalIp
()
{
def
getExternalIp
()
:
String
=
{
val
url
=
"http://icanhazip.com"
val
url
=
"http://icanhazip.com"
val
client
=
new
OkHttpClient
.
Builder
()
val
client
=
new
OkHttpClient
.
Builder
()
.
connectTimeout
(
10
,
TimeUnit
.
SECONDS
)
.
connectTimeout
(
10
,
TimeUnit
.
SECONDS
)
...
@@ -133,7 +133,11 @@ trait BaseService extends Service {
...
@@ -133,7 +133,11 @@ trait BaseService extends Service {
val
request
=
new
Request
.
Builder
()
val
request
=
new
Request
.
Builder
()
.
url
(
url
)
.
url
(
url
)
.
build
()
.
build
()
client
.
newCall
(
request
).
execute
().
body
.
string
val
response
=
client
.
newCall
(
request
).
execute
()
if
(
response
.
isSuccessful
)
response
.
body
.
string
.
trim
else
""
}
}
def
connect
()
{
def
connect
()
{
...
...
mobile/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
f43362fb
...
@@ -89,9 +89,9 @@ class ShadowsocksNatService extends BaseService {
...
@@ -89,9 +89,9 @@ class ShadowsocksNatService extends BaseService {
ConfigUtils
.
OVERTURE_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
ConfigUtils
.
OVERTURE_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
profile
.
localPort
+
53
,
// Local Port
profile
.
localPort
+
53
,
// Local Port
"119.29.29.29"
,
// Primary DNS 1
"119.29.29.29"
,
// Primary DNS 1
"
tc
p"
,
// DNS type of Primary DNS 1
"
ud
p"
,
// DNS type of Primary DNS 1
"114.114.114.114"
,
// Primary DNS 2
"114.114.114.114"
,
// Primary DNS 2
"
tc
p"
,
// DNS type of Primary DNS 2
"
ud
p"
,
// DNS type of Primary DNS 2
profile
.
remoteDns
,
// Alternative DNS
profile
.
remoteDns
,
// Alternative DNS
"127.0.0.1:"
+
profile
.
localPort
,
// Local SOCKS5 Proxy
"127.0.0.1:"
+
profile
.
localPort
,
// Local SOCKS5 Proxy
externalIp
)
// External IP
externalIp
)
// External IP
...
...
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