Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Sounds like something that another language would be much more suited to. Like lua. What are you trying to do?
-
Jifuna37262yI don't think you'll find something in laymans terms because vpns are complex as fuck
-
Ganofins7472y@Jifuna i should've said no to him. I tried going through openvpn client code and other open-source openvpn client codes but couldn't understand any of it
@tosensei client needs it -
-
Ganofins7472y@tosensei he just needs to pass some random collected openvpn configs to the script and print only the working openvpn configs
-
@Ganofins so he doesn't need an openvpn client in php.
you could just use php to invoke console commands to feed the files into an already-existing native openvpn-client. -
Ganofins7472y@tosensei @Jifuna I tried that the very first but didn't work since after invoking the openvpn on console, like if it is connected the shell_exec function will never stop
-
Ganofins7472y@tosensei @Jifuna like openvpn command doesn't simply return true or false if the openvpn config file is connectable or not
-
Jifuna37262y@Ganofins Yeah I think you should say no to the client. One way to do it is reading the output from the openvpn but I'm not sure if that's possible in php with the command still running? You also have openvpn verify command but I don't think that's what you need.
-
Jifuna37262y@Ganofins Ah if you can make the command run async, while reading that file in an interval that should work.
-
C0D4669022yI have done things in PHP that would turn some eyes, but this.... yeah, nah this ain't one of them.
Why, of all the languages better suited for this, would you use PHP?
This ain't a PHP hate thing, I love my php 🥰 -
Ganofins7472yThanks everyone for your valuable responses
I think openvpn --status trick worked. Waiting for the client's response
Related Rants
Hey
Any good resources for writing openvpn client in PHP?
I tried Googling but couldn't find any good article in layman's terms
Thanks
question
openvpn
php