Android SoftEther - getsid() workaround

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Android SoftEther - getsid() workaround

Post by sky59 » 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

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Wed May 08, 2019 8:36 am

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
You do not have the required permissions to view the files attached to this post.
Last edited by sky59 on Wed May 08, 2019 8:38 am, edited 1 time in total.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Wed May 08, 2019 8:37 am

DSCN2422.JPG


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

thanx
You do not have the required permissions to view the files attached to this post.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Thu May 16, 2019 12:57 pm

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
You do not have the required permissions to view the files attached to this post.

cedar
Site Admin
Posts: 2197
Joined: Sat Mar 09, 2013 5:37 am

Re: Android SoftEther - getsid() workaround

Post by cedar » Tue Jun 11, 2019 8:37 am

getsid is used for daemonization.
You can start the service in the foreground by specifying "execsvc" instead of "start".

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Tue Jun 11, 2019 9:06 am

thanx! I will try it!

rohitsingh1333
Posts: 2
Joined: Tue Aug 13, 2019 6:25 pm

Re: Android SoftEther - getsid() workaround

Post by rohitsingh1333 » Tue Aug 13, 2019 7:24 pm

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.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » 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?

fenice
Posts: 184
Joined: Sun Jul 19, 2015 4:23 pm

Re: Android SoftEther - getsid() workaround

Post by fenice » Sun Aug 18, 2019 6:52 am

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.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Sun Aug 18, 2019 1:29 pm

Just out of interest, how did you manage to compile it? For which API level?

rohitsingh1333
Posts: 2
Joined: Tue Aug 13, 2019 6:25 pm

Re: Android SoftEther - getsid() workaround

Post by rohitsingh1333 » Wed Aug 28, 2019 5:14 pm

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.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Wed Aug 28, 2019 7:43 pm

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

Safdar
Posts: 9
Joined: Tue Aug 13, 2019 6:01 am

Re: Android SoftEther - getsid() workaround

Post by Safdar » Fri Dec 06, 2019 4:22 pm

I have rooted device...
Can u provide .apk file please.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Fri Dec 06, 2019 8:06 pm

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.

Safdar
Posts: 9
Joined: Tue Aug 13, 2019 6:01 am

Re: Android SoftEther - getsid() workaround

Post by Safdar » Sun Dec 08, 2019 3:21 pm

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....

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Sun Dec 08, 2019 4:16 pm

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!

Safdar
Posts: 9
Joined: Tue Aug 13, 2019 6:01 am

Re: Android SoftEther - getsid() workaround

Post by Safdar » Wed Dec 11, 2019 1:27 pm

Okay thanks Dear...
But its not possible for me.
I don't know anything 😞

Safdar
Posts: 9
Joined: Tue Aug 13, 2019 6:01 am

Re: Android SoftEther - getsid() workaround

Post by Safdar » Thu Dec 12, 2019 1:09 pm

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"

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Thu Dec 12, 2019 4:50 pm

It is terminal

Safdar
Posts: 9
Joined: Tue Aug 13, 2019 6:01 am

Re: Android SoftEther - getsid() workaround

Post by Safdar » Thu Dec 12, 2019 6:10 pm

Can u send me please Telegram or messanger id?

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Fri Dec 13, 2019 6:22 am

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

garanadhav
Posts: 6
Joined: Wed Nov 27, 2019 5:36 am

Re: Android SoftEther - getsid() workaround

Post by garanadhav » Mon Dec 23, 2019 3:24 am

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.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: Android SoftEther - getsid() workaround

Post by sky59 » Mon Dec 23, 2019 7:52 am

Super!

Post Reply