Page 1 of 1

Android SoftEther - getsid() workaround

Posted: Mon May 06, 2019 2:00 pm
by sky59
After installing SE on A5V11 router, OrangePiZero and Ubuntu I decided to install it also on Android.

As I have very old rooted tablet (3 pieces) I decided to go on for API-14 level , JellyBean 4.1 android

After three days preparing cross compile environment installing OpenSSl, iconv, zlib, readline, ncurses, ifaddrs I finally have working
environment (at least seems to be)

Also differences between Android kernel and standard kernel needed some minor changes - if they work I will see

BUT:

there still remain one problem - there is no support for syscall getsid() in old APIs, I think they support from API-21 or -24

I also read somewere "remedy" just to return from function -1 , with this change I also compiled vpnserver, vpnbridge, vpncmd files, not tested them yet

No idea, what exactly, which process needs to be killed created by SoftEther?

My question is , probably on SE developers, how they would recommend any work around for this missing syscall in Android kernel?

I do not want to start now to generate new bionic library from source files implementing syscall getsid(), I have found it is a few instructions
in assembler

Re: Android SoftEther - getsid() workaround

Posted: Wed May 08, 2019 8:36 am
by sky59
good news is that it really works with abovementioned workaround for getsid()

STILL QUESTION: what can this workaround affect? what SE funcionality?

I attach some pictures, tested both BRGIDGE and CLIENT

Unfortunately package readline tar.gz (newest) has still got some bug, CRLF and BACKSPACE is not working correctly
DSCN2421.JPG
DSCN2420.JPG
DSCN2419.JPG

Re: Android SoftEther - getsid() workaround

Posted: Wed May 08, 2019 8:37 am
by sky59
DSCN2422.JPG


So, please, if anybody can explain about getsid() fucionality I would be very happy

thanx

Re: Android SoftEther - getsid() workaround

Posted: Thu May 16, 2019 12:57 pm
by sky59
finally, I made it work also in reality, not only connect to the server

so far I noticed, that when starting client (with modified getsid() ) sometimes creates more than two instances of process, then it does not work
so I kill all of then and start again.... until there are only two processes

Can this be a "drawback" from neglecting getsid() ???

on picture you can see IP address of WIFI and IP address reported also by whatismyip.com - vpn_banovce interface
DSCN2425.JPG

Re: Android SoftEther - getsid() workaround

Posted: Tue Jun 11, 2019 8:37 am
by cedar
getsid is used for daemonization.
You can start the service in the foreground by specifying "execsvc" instead of "start".

Re: Android SoftEther - getsid() workaround

Posted: Tue Jun 11, 2019 9:06 am
by sky59
thanx! I will try it!

Re: Android SoftEther - getsid() workaround

Posted: Tue Aug 13, 2019 7:24 pm
by rohitsingh1333
sky59 wrote:
Mon May 06, 2019 2:00 pm
After installing SE on A5V11 router, OrangePiZero and Ubuntu I decided to install it also on Android.

As I have very old rooted tablet (3 pieces) I decided to go on for API-14 level , JellyBean 4.1 android

After three days preparing cross compile environment installing OpenSSl, iconv, zlib, readline, ncurses, ifaddrs I finally have working
environment (at least seems to be)

Also differences between Android kernel and standard kernel needed some minor changes - if they work I will see

BUT:

there still remain one problem - there is no support for syscall getsid() in old APIs, I think they support from API-21 or -24

I also read somewere "remedy" just to return from function -1 , with this change I also compiled vpnserver, vpnbridge, vpncmd files, not tested them yet

No idea, what exactly, which process needs to be killed created by SoftEther?

My question is , probably on SE developers, how they would recommend any work around for this missing syscall in Android kernel?

I do not want to start now to generate new bionic library from source files implementing syscall getsid(), I have found it is a few instructions
in assembler
Hey, I also managed to get the softether client work for android, I am using Android pie. The thing is, the client is able to establish a connection with server on the virtual tun interface, but the complete traffic of the device is not routed through that tun interface. Could you guide me on how to set the routes so as to forward all traffic through the VPN virtual interface.

Re: Android SoftEther - getsid() workaround

Posted: Sun Aug 18, 2019 6:36 am
by sky59
I have already written to se team they have mess with ip route table but nobody cares....

After everything is done, the last step is to correct ip route table like this:
Addresses are gateways


ip route del default via 192.168.92.1 dev vpn_banovce
ip route add 0.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 64.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 128.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 192.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add xx.xx.xx.xx via 192.168.8.1 dev wlan0


xx is ip adress of your se server

What is android pie?

Re: Android SoftEther - getsid() workaround

Posted: Sun Aug 18, 2019 6:52 am
by fenice
sky59 wrote:
Sun Aug 18, 2019 6:36 am
I have already written to se team they have mess with ip route table but nobody cares....
Did you file a bug report? If you did you could also post a link in the forums so anyone with an interest can add their comments to it, that helps the debelopers prioritize their work.

sky59 wrote:
Sun Aug 18, 2019 6:36 am
What is android pie?
It the 'codename' for the latest Android version i.e. 9.

Re: Android SoftEther - getsid() workaround

Posted: Sun Aug 18, 2019 1:29 pm
by sky59
Just out of interest, how did you manage to compile it? For which API level?

Re: Android SoftEther - getsid() workaround

Posted: Wed Aug 28, 2019 5:14 pm
by rohitsingh1333
sky59 wrote:
Sun Aug 18, 2019 6:36 am
I have already written to se team they have mess with ip route table but nobody cares....

After everything is done, the last step is to correct ip route table like this:
Addresses are gateways


ip route del default via 192.168.92.1 dev vpn_banovce
ip route add 0.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 64.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 128.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 192.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add xx.xx.xx.xx via 192.168.8.1 dev wlan0


xx is ip adress of your se server

What is android pie?

I think these route table changes doesn't take effect on android pie as there had been several changes in Android routing tables over the past few years. Someone said me that KitKat was the last Android version to support these native linux commands. Which Android version is your device on? Also could you guide me a little more on this matter, I am a noob trying my way best to get things working.

Re: Android SoftEther - getsid() workaround

Posted: Wed Aug 28, 2019 7:43 pm
by sky59
Jelly Bean 4.1

If you are right then i am happy to keep this old tablet - forever!

I can do whatever i want with it

Re: Android SoftEther - getsid() workaround

Posted: Fri Dec 06, 2019 4:22 pm
by Safdar
I have rooted device...
Can u provide .apk file please.

Re: Android SoftEther - getsid() workaround

Posted: Fri Dec 06, 2019 8:06 pm
by sky59
It is not apk file.
I start vpnclient using vpncmd manually in terminal window.
It takes about 5 minutes to execute all commands.

But reward is i am connected by genuine softether protocol over port 443.
So far no firewall able to block it.

I use preferably openvpn.apk using udp port 1194. But sometimes this does not work.
Then solution above.

Re: Android SoftEther - getsid() workaround

Posted: Sun Dec 08, 2019 3:21 pm
by Safdar
Oho Great....
So dear what things needed to run vpnclient in rooted Android....
Please can u help me do to this.
Im also using softether in pc working fine for free internet on my own server.
But now i want to use it on mobile....

Re: Android SoftEther - getsid() workaround

Posted: Sun Dec 08, 2019 4:16 pm
by sky59
You need:
-rooted tablet/mobile(then it is "normal" linux machine)
When i start se vpn the android even does not know about it :-)
-vpnclient compiled for it(i have arm processor mediatek)
-vpncmd
-vpn_client.config
-hamcore file (product of compilation)

last one i obtained in easy way: connected lan/usb to tablet and then using pc with manager i configured it

I recommend you to try to start vpnclient on linux machine to learn how to

I first installed it on tablet, then i took files and tried it on mobile phone with mediatek chip and it works also!

Re: Android SoftEther - getsid() workaround

Posted: Wed Dec 11, 2019 1:27 pm
by Safdar
Okay thanks Dear...
But its not possible for me.
I don't know anything 😞

Re: Android SoftEther - getsid() workaround

Posted: Thu Dec 12, 2019 1:09 pm
by Safdar
Dear i successfully setup client in Ubuntu.
Now im going to try it on Android.
Just tell me that what software are u using for command
That is in your post screen shot.
"Window 1"

Re: Android SoftEther - getsid() workaround

Posted: Thu Dec 12, 2019 4:50 pm
by sky59
It is terminal

Re: Android SoftEther - getsid() workaround

Posted: Thu Dec 12, 2019 6:10 pm
by Safdar
Can u send me please Telegram or messanger id?

Re: Android SoftEther - getsid() workaround

Posted: Fri Dec 13, 2019 6:22 am
by sky59
Safdar wrote:
Thu Dec 12, 2019 6:10 pm
Can u send me please Telegram or messanger id?
sky59@bigmir.net

Re: Android SoftEther - getsid() workaround

Posted: Mon Dec 23, 2019 3:24 am
by garanadhav
sky59 wrote:
Mon May 06, 2019 2:00 pm
After installing SE on A5V11 router, OrangePiZero and Ubuntu I decided to install it also on Android.

As I have very old rooted tablet (3 pieces) I decided to go on for API-14 level , JellyBean 4.1 android

After three days preparing cross compile environment installing OpenSSl, iconv, zlib, readline, ncurses, ifaddrs I finally have working
environment (at least seems to be)

Also differences between Android kernel and standard kernel needed some minor changes - if they work I will see

BUT:

there still remain one problem - there is no support for syscall getsid() in old APIs, I think they support from API-21 or -24

I also read somewere "remedy" just to return from function -1 , with this change I also compiled vpnserver, vpnbridge, vpncmd files, not tested them yet

No idea, what exactly, which process needs to be killed created by SoftEther?

My question is , probably on SE developers, how they would recommend any work around for this missing syscall in Android kernel?

I do not want to start now to generate new bionic library from source files implementing syscall getsid(), I have found it is a few instructions
in assembler
Dear i successfully setup client in Ubuntu.
Now im going to try it on Android.

Re: Android SoftEther - getsid() workaround

Posted: Mon Dec 23, 2019 7:52 am
by sky59
Super!