The addAddress call may just be configuring the local side of the VPN. It’s hard to know without looking at the rest of the code.
The general workflow when establishing a VPN connection is:
- open a socket to the destination VPN service (ProtonVPN, or whatever suspect service).
- configure parameters such as DNS, split tunneling, and which networks to route over the VPN (generally everything from your local system, except the VPN connection itself).
- update the local routing so traffic starts flowing over the VPN.
addAddress may just be part of the configuration. A very cursory search suggests that OpenVPN may be being used as the underlying VPN implementation framework (not uncommon).
The simple answer is yes.
It’s possible to encode or tunnel anything over any protocol.
The next question is why isn’t it done more?
For the above reasons it’s actually more common to see other protocols run on top of http. This is especially common to prevent blocking and censorship by making the traffic look like normal http traffic when it may actually be private messaging apps, file transfers, VPN, etc.