kylemanna / kylemanna/docker-openvpn

Allow to export the client config separated in a .ovpn and .p12 file

Open
#596 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
9.1k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

On android, it's more secure to import your certificate in the android hardware keychain.

See here for details

It would be interesting to also have a parameter for ovpn_getclient to make a .ovpn file and a .p12 file.

I'm now doing that in the following way:

CLIENTNAME=some-smartphone
docker run -v openvpn-data:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn easyrsa build-client-full $CLIENTNAME
docker run -v openvpn-data:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn easyrsa export-p12 $CLIENTNAME
cp /var/lib/docker/volumes/openvpn-data/_data/pki/private/$CLIENTNAME.p12 /home/myuser/
chmod a+r /home/myuser/$CLIENTNAME.p12
docker run -v openvpn-data:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_getclient $CLIENTNAME > /home/myuser/$CLIENTNAME.ovpn
sed -i "/<key>/,/<\/ca>/d" /home/myuser/$CLIENTNAME.ovpn

Afterwards, load the .p12 file by simply opening it in android and then import the .ovpn file in the "OpenVPN for Android" app.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ovpn_getclient entry point and compare its current output with the easyrsa build-client-full and export-p12 workflow shown in the issue. The change is complete when the command can produce separate .ovpn and .p12 files that support the described OpenVPN for Android import flow without requiring manual editing.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, docker, shell
Domain
cli, networking, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.