badvpn-server(8)
π badvpn-server β the manual page, bestie edition π
okay so you're in the badvpn-server(8) page, from the System Manager's Manual, and honestly? this one's a whole vibe. it's the chat server for BadVPN, and no cap, it's the little matchmaker that lets your VPN peers actually find each other. let's get into it π«Ά
β¨ NAME β¨
badvpn-server β chat server for the BadVPN peer-to-peer VPN system
πΈ SYNOPSIS πΈ
badvpn-server
[--help]
[--version]
[--logger <stdout/syslog>]
(logger=syslog?
[--syslog-facility <string>]
[--syslog-ident <string>]
)
[--loglevel <0-5/none/error/warning/notice/info/debug>]
[--channel-loglevel <channel-name>
<0-5/none/error/warning/notice/info/debug>] ...
[--listen-addr <addr>] ...
[--ssl --nssdb <string> --server-cert-name <string>]
[--comm-predicate <string>]
[--relay-predicate <string>]
[--client-socket-sndbuf <bytes / 0>]
π INTRODUCTION π
so this page is all about the BadVPN server, which lives inside a BadVPN VPN network and lets peers talk to each other so they can set up their data connections. it's giving "social secretary for your VPN" energy. π
want the full BadVPN lore, the whole cinematic universe? that's over in badvpn(7). go read it, i'll wait π
π DESCRIPTION π
the BadVPN server is a chat server used by the nodes in the VPN network to talk to each other and establish data connections. that's its whole job and it does it beautifully. β¨
once it initializes, the server only terminates if a signal is received. so like, it's not gonna quit on you for no reason β you gotta tell it. periodt.
π OPTIONS π
the BadVPN server is configured entirely from command line. no config file, no drama, just flags. iconic honestly.
--helpβ print version and command line syntax, then exit. it's the "wait what do i type" button π--versionβ print version and exit. that's it, that's the whole thing π¦--logger <stdout/syslog>β pick where your messages go. default isstdout. heads up: syslog is not available on Windows π--syslog-facility <string>β when you're logging to syslog, this sets the logging facility. the facility name has to be in lower case, no uppercase shenanigans.--syslog-ident <string>β when you're logging to syslog, this sets the ident.--loglevel <0-5/none/error/warning/notice/info/debug>β sets the default logging level.--channel-loglevel <channel-name> <0-5/none/error/warning/notice/info/debug>β sets the logging level for one specific logging channel. per-channel glow-up β¨--listen-addr <addr>β add an address for the server to listen on. address format is further down, keep scrolling bestie π--sslβ use TLS. this one requires--nssdband--server-cert-name, so don't show up without them π--nssdb <string>β when using TLS, this is the NSS database to use. probably something likesql:/some/folder.--server-cert-name <string>β when using TLS, the name of the certificate to use. the certificate must be readily accessible, so like, have it ready bestie.--comm-predicate <string>β sets a predicate defining which pairs of clients are allowed to communicate. it's a logical expression, details below. available functions:p1name(string)β true if the TLS common name of peer 1 equals the given string. if TLS isn't used, the common name is assumed to be an empty string.p1addr(string)β true if the IP address of peer 1 equals the given string. the string must not be a name.p2name(string)β true if the TLS common name of peer 2 equals the given string. if TLS isn't used, the common name is assumed to be an empty string.p2addr(string)β true if the IP address of peer 2 equals the given string. the string must not be a name.- and there's no rule about which one is peer 1 and which is peer 2. when the server needs to figure out whether two peers can communicate, it evaluates the predicate once and in no specific order. so don't build your whole personality on which is which π
--relay-predicate <string>β sets a predicate defining how peers can relay data through other peers. it's a logical expression, details below. if the predicate evaluates to true, peer P can relay data through peer R. available functions:pname(string)β true if the TLS common name of peer P peer equals the given string. if TLS isn't used, the common name is assumed to be an empty string.paddr(string)β true if the IP address of peer P equals the given string. the string must not be a name.rname(string)β true if the TLS common name of peer R peer equals the given string. if TLS isn't used, the common name is assumed to be an empty string.raddr(string)β true if the IP address of peer R equals the given string. the string must not be a name.
--client-socket-sndbuf <bytes / 0>β sets the value of theSO_SNDBUFsocket option for client TCP sockets (zero means don't set it). lower values improve fairness when data from multiple peers is being sent to a given peer, but heads up β they may result in lower bandwidth if the network's bandwidth-delay product is too big. trade-offs, bestie, it's giving β¨balanceβ¨
π EXIT CODE π
- if initialization fails, it exits with code
1. - otherwise it runs until termination is requested and exits with code
1.
yeah. both of them are 1. that's not a typo, that's just how it is. fr fr. π«
π ADDRESS FORMAT π
addresses have the form ipaddr:port, where ipaddr is either:
- an IPv4 address (name or numeric), or
- an IPv6 address enclosed in brackets
[](name or numeric again).
brackets for the v6 girlies, we love to see it π
π§ PREDICATES π§
the BadVPN server includes a small predicate language used to define certain policies. the syntax and semantics of the language are described right here, bestie. grab a snack. π
trueβ logical true constant. evaluates to1.falseβ logical false constant. evaluates to0.NOT expressionβ logical negation. if the expression evaluates to error, the negation evaluates to error.expression OR expressionβ logical disjunction. the second expression is only evaluated if the first expression evaluates to false. if a sub-expression evaluates to error, the disjunction evaluates to error.expression AND expressionβ logical conjunction. the second expression is only evaluated if the first expression evaluates to true. if a sub-expression evaluates to error, the conjunction evaluates to error.function(arg, ..., arg)β evaluation of a user-provided function (wherefunctionis the name of the function,[a-zA-Z0-9_]+).- if the function with the given name doesn't exist, it evaluates to error.
- arguments are evaluated from left to right.
- each argument can either be a logical expression or a string (characters enclosed in double quotes, without any double quote).
- if an argument is encountered but all needed arguments have already been evaluated, the function evaluates to error.
- if an argument is of the wrong type, it is not evaluated and the function evaluates to error.
- if an argument evaluates to error, the function evaluates to error.
- if after all arguments have been evaluated the function needs more arguments, it evaluates to error.
- then the handler function is called. if it returns anything other than
1and0, the function evaluates to error. otherwise it evaluates to what the handler function returned.
so many error paths, and every single one of them is valid. the error handling in this language is honestly main character energy π€
π EXAMPLES π
for examples of using BadVPN, see badvpn(7). yes, it's a cross-reference, yes it's still an example section, we don't make the rules π
πΈ SEE ALSO πΈ
π AUTHORS π
Ambroz Bizjak <ambrop7@gmail.com> β thank you for your service, king π
and that's the whole page bestie!! the source is the System Manager's Manual, and this beauty is dated 21 June 2011. go forth and chat-server responsibly π β¨π¦
π one last thing
bye babes, good luck with your predicates, drink water, and remember: if init fails, you're getting a 1, and if it doesn't, you're still getting a 1. slay π
π¦ where this page comes from
- arch rolling: badvpn 1.999.130-10 Β· BSD-3-Clause
- fedora 43: badvpn 1.999.130-14.fc43 Β· LicenseRef-Callaway-BSD
- nixos 26.05: badvpn 1.999.130
- nixpkgs unstable: badvpn 1.999.130
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms