Win::Service -- A Windows Service wrapper.
Win::LogFile -- a LogBase derivative that allows logging
to a natively created and handled file.
Win::module_name() -- Get the module name as a
std::wstring.
Win::module_name_utf8() -- Get the module name as a UTF-8
string.
* Where unicode/ansi versions of a method exist, always
explicitly call one of unicode or ansi methods by
appending a 'W' or 'A' to the end of the method name.
Never omit the 'W' or 'A' because that will cause the
default method to be used which may vary according to
build flags.
* Prepend all Windows API method references with "::" to
indicate that the method names should be resolved from
the top-level namespace.
Win::Service -- A Windows Service wrapper.
Win::LogFile -- a LogBase derivative that allows logging
to a natively created and handled file.
Win::module_name() -- Get the module name as a
std::wstring.
Win::module_name_utf8() -- Get the module name as a UTF-8
string.
This class can be used by pgproxy to operate on listeners
no matter their actual implementation.
This way pgproxy can support different listeners at the
same time.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Previously, all listener sockets were configured with both
reuseaddr and reuseport. reuseaddr is reasonable to use as
a default, but reuseport should only be used when different
threads are listening on the same local port/address for
load-balancing purposes.
This patch adds two new socket option flags DISABLE_REUSE_ADDR
and REUSE_PORT, to provide finer-grained control over
these options.
Signed-off-by: James Yonan <james@openvpn.net>
As noted in the Asio documentation, an AsioTimer handler can be
called with a non-error status after timer cancellation.
Unfortunately, this can lead to race conditions, so I'm moving over
all AsioTimer users to AsioTimerSafe when I don't see the handler
clearly checking for late cancellation.
Signed-off-by: James Yonan <james@openvpn.net>
The walk() method calls a caller-defined function on all
of the active client instance objects bound to the listener.
Signed-off-by: James Yonan <james@openvpn.net>
Child classes may want to operate on a received buffer, before it is
passed down the stack. This can be useful when the Proxy Protocol
parser wants to parse and wipe its header.
Make it a virtual method so that it can be overridden by child classes
where higher level logic are implemented.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
This class can be used by pgproxy to operate on listeners
no matter their actual implementation.
This way pgproxy can support different listeners at the
same time.
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Alt Routing allows services on meshed PG nodes to communicate
with services on other nodes via the secure mesh, and without
requiring SSL.
Signed-off-by: James Yonan <james@openvpn.net>
* Cancel general timeouts for websockets
* CoarseTimer must always be reset when its associated
AsioTimer is cancelled.
Signed-off-by: James Yonan <james@openvpn.net>
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.
This commit includes:
* Added ASIO=1 to many "go" scripts that require asio
* Renamed "asio::" to "openvpn_io::".
Signed-off-by: James Yonan <james@openvpn.net>