Getting Started
VPNWholesaler.com Custom In-App SDK is intended for Development Teams that want to fully customize their VPN apps based their requirements.
Swift SDK for MacOS and iOS Xcode
General setup
Follow the steps below to add the SDK static lib to your project:
- Download the library from the Downloads section and unpack the downloaded archive
- Add VPNSDK.framework to the
Frameworks, Libraries, and Embedded Contentsection in the General tab - Import the SDK to your main view controller:
import VPNSDK - Implement OVSNotifyDelegate interface in the view controller class:
func OVSNotifyCB(_ notify_code: OVS_NOTIFY_CODES, err_code: OVS_ERROR_CODES, _ data:String?) { } - Intialize SDK in viewDidLoad method of your main view:
vpnsdk = VPNSDKLib()
vpnsdk.InitOVSCore(self)
- Turn on Personal VPN capability on
Signing & Capabilitiestab - Turn on Incoming and Outgoing connections capability on
Signing & Capabilitiestab in App Sandbox capability - Turn on Packet Tunnel capability on
Signing & Capabilitiestab in Network Extensions capability - Use vpnsdk.CmdProc method to call SDK methods
Adding wireguard and shadowsocks Libraries
Follow the following steps in order to use ShadowSocks and Wireguard protocols in your iOS and MacOS app
- Create 2 Network Extensions for both protocols:
- Go to File -> New -> Target
- Select Network Extension
- Use product name SocketTunnel for ShadowSocks and WGTunnel for Wireguard
- Put the content of the corresponding folder into the newly created extension source code folder
- Add Network Extensions capability and select Packet Filter checkbox
- Turn on Incoming and Outgoing capability on
Signing & Capabilitiestab in App Sandbox capability - Turn on Packet Tunnel capability on
Signing & Capabilitiestab in Network Extensions capability
- For SocketTunnel extension ensure that:
- Framework and libraries section include: libVPNSDKSocksTunnel.xcframework and Tun2socks.xcframework
- Build settings:
Enable bitcode: NoSwift-Compiler - Search Paths - Import Paths: SocketTunnel
- For WGTunnel:
-
Framework and libraries section include: WG.xcframework, WGSupport.xcframework and WGTunnel.xcframework
-
Build settings:
Enable bitcode: NoSwift-Compiler - Search Paths - Import Paths: WGTunnel