Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: expected identifier or '(' #5

Closed
w3rkzeug opened this issue Jan 23, 2021 · 11 comments
Closed

error: expected identifier or '(' #5

w3rkzeug opened this issue Jan 23, 2021 · 11 comments

Comments

@w3rkzeug
Copy link

Hi, i've linked this library to my project, just adding this to gradle:

externalNativeBuild { ndkBuild { path file('../../../hev-socks5-tunnel-master/jni/Android.mk') } }

Now when building it it throws the below error, could you please help me out with it ?

In file included from C:\Users\User\Downloads\hev-socks5-tunnel-master\jni\src\hev-socks5-session.c:14: C:\Users\User\Downloads\hev-socks5-tunnel-master\jni\third-part\hev-task-system\include\hev-task.h:1:1: error: expected identifier or '('

image

Any Help would be kindly appreciated,
Thanks

@heiher
Copy link
Owner

heiher commented Jan 23, 2021

Because the Windows file system does not support symbolic links, you need to replace the files with the same name in the include directory with the files in the src directory:

e.g.

cp src/kern/task/hev-task.h include/hev-task.h
...

@w3rkzeug
Copy link
Author

Much appreciated, but how do i do that with android studio ? or i have to define manually each file location ?
Thanks

@heiher
Copy link
Owner

heiher commented Jan 23, 2021

If you can't start building after replacement, I think you can fork this project and modify it, and then integrate it into your project. :)

@w3rkzeug
Copy link
Author

w3rkzeug commented Jan 23, 2021 via email

@w3rkzeug
Copy link
Author

Off topic sorry, where should i put the config file in the android studio project ?
Thanks

If you can't start building after replacement, I think you can fork this project and modify it, and then integrate it into your project. :)

@w3rkzeug
Copy link
Author

Fixed the paths, no errors thrown , can't get it work though...Don't know where to include the file & how to debug the reason...

@heiher
Copy link
Owner

heiher commented Jan 25, 2021

Fixed the paths, no errors thrown , can't get it work though...Don't know where to include the file & how to debug the reason...

Please verify the establishment of TCP connection via IPv4/IPv6 address first, and then look at DNS.

@w3rkzeug
Copy link
Author

Fixed the paths, no errors thrown , can't get it work though...Don't know where to include the file & how to debug the reason...

Please verify the establishment of TCP connection via IPv4/IPv6 address first, and then look at DNS.

Does it have a default configuration ? ( The 1080 port is also closed )
I can ping the device & it uses the public DNS ,the only open port is ICMP, i wonder where exactly should i put the main.yml config file ?

image

@heiher
Copy link
Owner

heiher commented Jan 25, 2021

What do you need to do? capture packets via VPN? (I see you integrate hev-socks5-server in the project.

@w3rkzeug
Copy link
Author

What do you need to do? capture packets via VPN? (I see you integrate hev-socks5-server in the project.

No not capturing packets , it's an app where the android device comes as proxy server for other clients.

@heiher
Copy link
Owner

heiher commented Jan 25, 2021

Looks this is easy to do, only hev-socks5-server is dependent. If it runs as a standalone process, it's same as running on Linux. If it run as an Android service, something are missing, such as:

  • JNI
  • Service manager
  • Config file

You can refer to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants