Skip to content

vpnc: update version and add nossl variant#25603

Open
jschwartzenberg wants to merge 1 commit into
openwrt:masterfrom
jschwartzenberg:feature/vpnc-nossl
Open

vpnc: update version and add nossl variant#25603
jschwartzenberg wants to merge 1 commit into
openwrt:masterfrom
jschwartzenberg:feature/vpnc-nossl

Conversation

@jschwartzenberg

@jschwartzenberg jschwartzenberg commented Dec 23, 2024

Copy link
Copy Markdown

Maintainer: @danielg4
Compile tested: (mipsel_24kc_musl, TP-Link Archer C50v6, f10ee1e20966bdb86cb61a87338f953de1d86cc6)
Compile tested: (arm_arm1176jzf-s_vfp, Raspberry Pi Model B Rev 2, 24.10.0-rc7)
Run tested: (arm_arm1176jzf-s_vfp, Raspberry Pi Model B Rev 2, 24.10.0-rc7)

Description:
Updated vpnc to the latest version. I submitted a patch that allows compilation without an SSL library. When using a pre-shared group key, vpnc doesn't use its SSL library, so for many cases this is not needed while it allows vpnc to be used on devices with little space where an SSL library does not fit. See also: streambinder/vpnc#55

Note that I still need to test the newer version and will report back. Many thanks in advance for any feedback you might have!

@BKPepe

BKPepe commented Dec 23, 2024

Copy link
Copy Markdown
Member

I noticed you've added a non-SSL version. We want to ensure we fully understand all potential use-case scenarios. Could you please share more information about the situations where this version would be used? This will help us ensure we're providing the best possible solution for all our users. May I know what is the size diference between SSL and nonSSL variant? We recommend using SSL/TLS, because of the security, which is top priority for us.

@jschwartzenberg

Copy link
Copy Markdown
Author

Could you please share more information about the situations where this version would be used?

vpnc supports VPN connections either with SSL certificates or using a private pre-shared group key. In case the nonSSL variant is used to connect to an endpoint that relies on certificates, it will bail out, no connection will be established. In the second case with the pre-shared key, the whole SSL library is not involved with the connection setup, so it doesn't matter whether you use an SSL or nonSSL build.

So the nossl version can only be used for scenarios which work with the pre-shared group key. I use it to connect to a Fritzbox.

May I know what is the size diference between SSL and nonSSL variant?

The SSL variant pulls in GNUTLS, which takes up more space than I have free on my TP-Link Archer C50. On my Turris Omnia I have more than enough space, but on the Archer C50 there's about a 3.5" floppy worth of space left after installing plain OpenWRT and by avoiding the SSL dependency I can still establish a VPN connection with vpnc :)

We recommend using SSL/TLS, because of the security, which is top priority for us.

In this case there's no security impact as these are independent connection mechanisms. If the endpoint requires SSL/TLS, you must use the SSL/TLS version. If the endpoint uses a pre-shared group key, you can use either version, but the SSL/TLS part will never be used.

Please let me know if I should provide more info! Many thanks for the quick response!

@jschwartzenberg
jschwartzenberg force-pushed the feature/vpnc-nossl branch 2 times, most recently from b0d6584 to 531aa9f Compare February 1, 2025 18:27
@jschwartzenberg

Copy link
Copy Markdown
Author

@BKPepe I added more information to the description. I hope it is more clear now. Let me know if I should alter it in any way.

I also solved another issue and tested that it works on my Raspberry Pi.

@BKPepe
BKPepe force-pushed the feature/vpnc-nossl branch from 531aa9f to 765b2e1 Compare June 15, 2025 09:34
@BKPepe
BKPepe force-pushed the feature/vpnc-nossl branch from 765b2e1 to 4b25970 Compare July 19, 2025 19:39
@BKPepe
BKPepe force-pushed the feature/vpnc-nossl branch from 4b25970 to 3b3be6a Compare May 6, 2026 07:00
@BKPepe
BKPepe force-pushed the feature/vpnc-nossl branch from 3b3be6a to 27403e7 Compare July 5, 2026 09:25

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit. One inline issue (conffiles template misnamed) and one nit. Commit message accurately reflects the diff.


Generated by Claude Code

Comment thread net/vpnc/Makefile Outdated
Comment on lines 94 to 96
define Package/vpnc-default/conffiles
/etc/vpnc/default.conf
endef

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conffiles template is renamed to Package/vpnc-default/conffiles, but no package by that name is built. OpenWrt looks up conffiles as Package/<pkgname>/conffiles, so it needs Package/vpnc/conffiles and Package/vpnc-nossl/conffiles. As written, neither package registers /etc/vpnc/default.conf as a conffile anymore — a regression from the previous Package/vpnc/conffiles, meaning the file is no longer preserved via the conffiles mechanism on upgrade/removal.

Mirroring the Package/vpnc-nossl/install assignment you already use:

Suggested change
define Package/vpnc-default/conffiles
/etc/vpnc/default.conf
endef
define Package/vpnc/conffiles
/etc/vpnc/default.conf
endef
Package/vpnc-nossl/conffiles = $(Package/vpnc/conffiles)

Generated by Claude Code

Comment thread net/vpnc/Makefile Outdated
VERSION="$(PKG_VERSION)" \
$(OPENSSL-$(CONFIG_VPNC_OPENSSL)) \
vpnc \
$(CRYPTO_NONE_MAKEFLAG) \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this continuation line is indented with spaces while the surrounding recipe uses tabs. For consistency with the rest of the block:

Suggested change
$(CRYPTO_NONE_MAKEFLAG) \
$(CRYPTO_NONE_MAKEFLAG) \

Generated by Claude Code

@jschwartzenberg
jschwartzenberg force-pushed the feature/vpnc-nossl branch 2 times, most recently from 86cd5a6 to 510fdd5 Compare July 18, 2026 22:08
@jschwartzenberg

jschwartzenberg commented Jul 18, 2026

Copy link
Copy Markdown
Author

Should I do anything about the indentation messages? There are tabs there already and I did not touch most of those lines.

Edit: I saw other Makefiles use spaces instead, so I guess this is something that is converging to a standard practice that wasn't enforced before. I updated the commit to conform.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found. The changes since the last review resolve both previously flagged items (the misnamed conffiles template is now Package/vpnc/conffiles with a vpnc-nossl mapping, and the makeflag indentation is fixed). Commit message still accurately reflects the diff.


Generated by Claude Code

@BKPepe

BKPepe commented Jul 19, 2026

Copy link
Copy Markdown
Member

I don't think it's possible to install vpnc-ssl and vpnc-nonssl at the same time, right? So CONFLICTS should be defined there.

@jschwartzenberg
jschwartzenberg force-pushed the feature/vpnc-nossl branch 2 times, most recently from 35b518d to 8221550 Compare July 19, 2026 08:19
@jschwartzenberg

Copy link
Copy Markdown
Author

I don't think it's possible to install vpnc-ssl and vpnc-nonssl at the same time, right? So CONFLICTS should be defined there.

Indeed! Added this now, I hope I did it correctly.

@jschwartzenberg

Copy link
Copy Markdown
Author

I updated the hash too now. I was thinking of looking at moving to a newer commit ID, as it seems there were quite some commits in the vpnc repository since I created this PR, but they all seem to be related to their CI.
https://github.com/streambinder/vpnc/commits/master/

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found. The changes since the last review (mutual CONFLICTS between vpnc and vpnc-nossl, the PKG_MIRROR_HASH update, and the description indentation normalization) are all correct and address the prior conversation. Commit message still accurately reflects the diff.


Generated by Claude Code

@jschwartzenberg

jschwartzenberg commented Jul 20, 2026

Copy link
Copy Markdown
Author

I updated the patch with the new line numbers as it was considered dirty. But now it seems to expect it can be attributed as well. It seems it was introduced by Rosen Penev in 2019. I guess I'll attribute it to them :)

There is a new version which adds one notable feature. The ability to build it
without linking it to any SSL/TLS library. This allows installing the package
without needing to drag along a SSL/TLS library. In most cases this library is
not used at all. It is only needed when using certificates. With only pre-shared
keys there is no need for vpnc to link against any SSL/TLS. This lets vpnc be
installed on devices that have a low amount of flash space available.

Signed-off-by: Julius Schwartzenberg <julius.schwartzenberg@eclipso.eu>
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

Successfully merging this pull request may close these issues.

3 participants