Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Linux: VPN Connection
Forum Updated to NodeBB v4.3 + New Features

Linux: VPN Connection

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vrazon
    wrote on last edited by vrazon
    #1

    I'm trying to write a VPN client application for Ubuntu using QtCreator 4.6.0. This would not be a cross platform application, it would only be released on Ubuntu and possibly some other Linux distros. I've found this page regarding the topic however, from the research I've done QtExtended was mainly for mobile devices and has been discontinued. So, how would I go about writing a VPN client application that implements a custom protocol I've written, using Qt Creator with C++? I already have a client library that I would be using along side this, so I would need to write my own implementation of whatever interface is supplied within Qt.

    • I'm looking for something similar to iOS/OSX's PacketTunnelProvider from the NetworkExtension framework, or Android's VpnService.
    • If that's not an option, what process should I be following to get this working the way I'd like?
    • Are there any examples of doing this available online?
    A aha_1980A 2 Replies Last reply
    0
    • V vrazon

      I'm trying to write a VPN client application for Ubuntu using QtCreator 4.6.0. This would not be a cross platform application, it would only be released on Ubuntu and possibly some other Linux distros. I've found this page regarding the topic however, from the research I've done QtExtended was mainly for mobile devices and has been discontinued. So, how would I go about writing a VPN client application that implements a custom protocol I've written, using Qt Creator with C++? I already have a client library that I would be using along side this, so I would need to write my own implementation of whatever interface is supplied within Qt.

      • I'm looking for something similar to iOS/OSX's PacketTunnelProvider from the NetworkExtension framework, or Android's VpnService.
      • If that's not an option, what process should I be following to get this working the way I'd like?
      • Are there any examples of doing this available online?
      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @vrazon This is a huge question... It's like saying how do I write Google Chrome?

      To help guide you, you can google "vpn rfc" to get the RFC's for VPNs. That will give you a ton of technical data on VPNs.

      You can also look up existing vpn technologies like OpenVPN and check out their source code to see how they are handling their VPN setup.

      You can look at the code for that discontinued QVPNClient and see what they are doing.

      This will be a large undertaking though, and you may want to consider just wrapping existing linux processes that handle vpns for you rather than trying to code your own. Again something like openvpn, or using network manager to setup a vpn with the PPTP protocol.

      Sorry I can't give more, that's just too broad of a question.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      V 1 Reply Last reply
      3
      • V vrazon

        I'm trying to write a VPN client application for Ubuntu using QtCreator 4.6.0. This would not be a cross platform application, it would only be released on Ubuntu and possibly some other Linux distros. I've found this page regarding the topic however, from the research I've done QtExtended was mainly for mobile devices and has been discontinued. So, how would I go about writing a VPN client application that implements a custom protocol I've written, using Qt Creator with C++? I already have a client library that I would be using along side this, so I would need to write my own implementation of whatever interface is supplied within Qt.

        • I'm looking for something similar to iOS/OSX's PacketTunnelProvider from the NetworkExtension framework, or Android's VpnService.
        • If that's not an option, what process should I be following to get this working the way I'd like?
        • Are there any examples of doing this available online?
        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #3

        Hi @vrazon,

        Just to add to @ambershark, when it comes to cryptography, you never invent your own protocol or write your own library. You use something that is widely used and actively maintained.

        If a new security leak comes up (think of heartbleed), then others are responsible for fixing that and update their libs. Otherwise you would be responsible for fixing the security hole. You don't want that.

        Qt has to stay free or it will die.

        1 Reply Last reply
        2
        • A ambershark

          @vrazon This is a huge question... It's like saying how do I write Google Chrome?

          To help guide you, you can google "vpn rfc" to get the RFC's for VPNs. That will give you a ton of technical data on VPNs.

          You can also look up existing vpn technologies like OpenVPN and check out their source code to see how they are handling their VPN setup.

          You can look at the code for that discontinued QVPNClient and see what they are doing.

          This will be a large undertaking though, and you may want to consider just wrapping existing linux processes that handle vpns for you rather than trying to code your own. Again something like openvpn, or using network manager to setup a vpn with the PPTP protocol.

          Sorry I can't give more, that's just too broad of a question.

          V Offline
          V Offline
          vrazon
          wrote on last edited by vrazon
          #4

          @aha_1980 said in Linux: VPN Connection:

          Hi @vrazon,

          Just to add to @ambershark, when it comes to cryptography, you never invent your own protocol or write your own library. You use something that is widely used and actively maintained.

          If a new security leak comes up (think of heartbleed), then others are responsible for fixing that and update their libs. Otherwise you would be responsible for fixing the security hole. You don't want that.

          Disregard the fact that I'm using a custom protocol, just assume I'm using a protocol that's well established but is unknown, or better yet simply unsupported by Qt, and has no active client application that can be wrapped with Qt.

          @ambershark said in Linux: VPN Connection:

          @vrazon This is a huge question... It's like saying how do I write Google Chrome?

          To help guide you, you can google "vpn rfc" to get the RFC's for VPNs. That will give you a ton of technical data on VPNs.

          You can also look up existing vpn technologies like OpenVPN and check out their source code to see how they are handling their VPN setup.

          You can look at the code for that discontinued QVPNClient and see what they are doing.

          This will be a large undertaking though, and you may want to consider just wrapping existing linux processes that handle vpns for you rather than trying to code your own. Again something like openvpn, or using network manager to setup a vpn with the PPTP protocol.

          Sorry I can't give more, that's just too broad of a question.

          I'm looking for something that ties into the software like iOS's NetworkExtension or Android's VPN Service that gives me an interface to the local tunnel adapter so that I can implement specific pieces of the interface to integrate my protocol. What I gather from what you're telling me is that nothing of this sort exists with Qt, meaning I will have to create the tunnel, and write a client myself in C++ to run within my Qt client, correct?

          A 1 Reply Last reply
          0
          • V vrazon

            @aha_1980 said in Linux: VPN Connection:

            Hi @vrazon,

            Just to add to @ambershark, when it comes to cryptography, you never invent your own protocol or write your own library. You use something that is widely used and actively maintained.

            If a new security leak comes up (think of heartbleed), then others are responsible for fixing that and update their libs. Otherwise you would be responsible for fixing the security hole. You don't want that.

            Disregard the fact that I'm using a custom protocol, just assume I'm using a protocol that's well established but is unknown, or better yet simply unsupported by Qt, and has no active client application that can be wrapped with Qt.

            @ambershark said in Linux: VPN Connection:

            @vrazon This is a huge question... It's like saying how do I write Google Chrome?

            To help guide you, you can google "vpn rfc" to get the RFC's for VPNs. That will give you a ton of technical data on VPNs.

            You can also look up existing vpn technologies like OpenVPN and check out their source code to see how they are handling their VPN setup.

            You can look at the code for that discontinued QVPNClient and see what they are doing.

            This will be a large undertaking though, and you may want to consider just wrapping existing linux processes that handle vpns for you rather than trying to code your own. Again something like openvpn, or using network manager to setup a vpn with the PPTP protocol.

            Sorry I can't give more, that's just too broad of a question.

            I'm looking for something that ties into the software like iOS's NetworkExtension or Android's VPN Service that gives me an interface to the local tunnel adapter so that I can implement specific pieces of the interface to integrate my protocol. What I gather from what you're telling me is that nothing of this sort exists with Qt, meaning I will have to create the tunnel, and write a client myself in C++ to run within my Qt client, correct?

            A Offline
            A Offline
            ambershark
            wrote on last edited by
            #5

            @vrazon said in Linux: VPN Connection:

            I'm looking for something that ties into the software like iOS's NetworkExtension or Android's VPN Service that gives me an interface to the local tunnel adapter so that I can implement specific pieces of the interface to integrate my protocol. What I gather from what you're telling me is that nothing of this sort exists with Qt, meaning I will have to create the tunnel, and write a client myself in C++ to run within my Qt client, correct?

            It may exist. I haven't done anything that required something like that in Qt, so I just don't know if there is a class that handles it. My gut feeling is that it doesn't exist and you would have to find one someone else wrote, or else write your own.

            I'm sure someone before you has written something (open sourced) like that. Even if it doesn't integrate with Qt fully, as long as it's in C++ you should be able to adapt and use it fairly easily.

            You could take that QtExtended and adapt the classes you need for your current project too. Even that would be less work than writing your own.

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved