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
b47776fc
Commit
b47776fc
authored
Dec 30, 2012
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix endian bugs on mips
parent
036a34d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
assets/shadowsocks
assets/shadowsocks
+0
-0
jni/shadowsocks/encrypt.c
jni/shadowsocks/encrypt.c
+3
-7
jni/shadowsocks/local.c
jni/shadowsocks/local.c
+7
-2
libs/armeabi/shadowsocks
libs/armeabi/shadowsocks
+0
-0
No files found.
assets/shadowsocks
View file @
b47776fc
No preview for this file type
jni/shadowsocks/encrypt.c
View file @
b47776fc
...
...
@@ -2,10 +2,7 @@
#include "android.h"
#include <openssl/md5.h>
typedef
unsigned
char
uint8_t
;
typedef
unsigned
int
uint32_t
;
typedef
unsigned
long
long
uint64_t
;
#include <endian.h>
static
int
random_compare
(
const
void
*
_x
,
const
void
*
_y
)
{
uint32_t
i
=
_i
;
...
...
@@ -150,9 +147,8 @@ int recv_decrypt(int sock, char *buf, int len, int flags) {
void
get_table
(
const
char
*
key
)
{
uint8_t
*
table
=
encrypt_table
;
uint8_t
*
tmp_hash
;
tmp_hash
=
MD5
((
const
uint8_t
*
)
key
,
strlen
(
key
),
NULL
);
_a
=
*
(
uint64_t
*
)
tmp_hash
;
uint8_t
*
tmp_hash
=
MD5
((
const
uint8_t
*
)
key
,
strlen
(
key
),
NULL
);
_a
=
htole64
(
*
(
uint64_t
*
)
tmp_hash
);
uint32_t
i
;
for
(
i
=
0
;
i
<
256
;
++
i
)
{
...
...
jni/shadowsocks/local.c
View file @
b47776fc
...
...
@@ -508,7 +508,8 @@ static void accept_cb (EV_P_ ev_io *w, int revents)
if
(
sockfd
<
0
)
{
perror
(
"socket"
);
close
(
sockfd
);
free_server
(
server
);
close_and_free_server
(
EV_A_
server
);
freeaddrinfo
(
res
);
continue
;
}
setnonblocking
(
sockfd
);
...
...
@@ -630,7 +631,11 @@ int main (int argc, char **argv)
setnonblocking
(
listenfd
);
struct
listen_ctx
listen_ctx
;
listen_ctx
.
fd
=
listenfd
;
struct
ev_loop
*
loop
=
EV_DEFAULT
;
struct
ev_loop
*
loop
=
ev_default_loop
(
EVBACKEND_EPOLL
|
EVFLAG_NOENV
);
if
(
!
loop
)
{
LOGE
(
"no epoll found here, maybe it hides under your chair"
);
return
1
;
}
ev_io_init
(
&
listen_ctx
.
io
,
accept_cb
,
listenfd
,
EV_READ
);
ev_io_start
(
loop
,
&
listen_ctx
.
io
);
ev_run
(
loop
,
0
);
...
...
libs/armeabi/shadowsocks
View file @
b47776fc
No preview for this file type
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