Giter Site home page Giter Site logo

anchorfreepartner / hydrasdk-demo-ios Goto Github PK

View Code? Open in Web Editor NEW
15.0 21.0 5.0 521.06 MB

Hydra SDK demo application for iOS

Home Page: https://developer.anchorfree.com

License: Apache License 2.0

Objective-C 88.08% Swift 10.70% Ruby 1.22%
clients apple

hydrasdk-demo-ios's Introduction

VPN SDK for iOS and macOS

Changelog

Prerequisites

  • Requires iOS 11+ or macOS 10.12+
  • Xcode 10.2.1

Capabilities

VPN SDK for iOS and macOS provides client API to authorize users and connect them to backend VPN services. It consists of 3 main parts:

  • Hydra SDK - provides API that allows you manage VPN connection using custom Hydra protocol and use content categorization service named Fireshield.
  • IPSec SDK - provides API that allows to use default Apple implementation of IPSec (IKEv2).
  • Composed SDK - provides API that allows to use different VPN protocols inside one app and switch between them more easily.

API Documentation

To see all available API, check API Reference.

hydrasdk-demo-ios's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hydrasdk-demo-ios's Issues

Permission Denied

Hello,
I logged in successfully and get all servers but when i try to connect this error shown to me, Please help me to fix this issue.
Thanks.

   private func startVPN() {
               self.hydraClient.start(location: country) { (e, _) in
                   if let ex = e {
                       print("Restart VPN error: \(ex)")
                   } else {
                       print("Restart VPN success, country: \(self.country?.code ?? "unknown")")
                   }
                   self.countryConnectedTo = self.country
                  
                // update ui 
               }
           }
           
           private func stopVPN(completion: ((Error?) ->())? = nil) {
               hydraClient.stop { (e) in
                   if let ex = e {
                       print("Stop VPN error: \(ex)")
                   } else {
                       print("Stop VPN success")
                   }
                   completion?(e)
               }
           }

Screen Shot 2020-10-22 at 3 21 45 PM

Error Log:
2020-10-22 15:15:44.794964+0200 RocketVPN[22060:5706587] [] nehelper sent invalid result code [1] for Wi-Fi information request
2020-10-22 15:15:44.797807+0200 RocketVPN[22060:5706587] [] nehelper sent invalid result code [1] for Wi-Fi information request
2020-10-22 15:15:44.800245+0200 RocketVPN[22060:5706618] [] Failed to load configurations: Error Domain=NEConfigurationErrorDomain Code=10 "permission denied" UserInfo={NSLocalizedDescription=permission denied}
Restart VPN error: Error Domain=NEVPNErrorDomain Code=5 "permission denied" UserInfo={NSLocalizedDescription=permission denied}

ByPass domains doesn't seem to work ?

I am trying to bypass google.co.in using the bypass domain property.
However this doesn't seem to work. can you please help ? The onDemand property is set to TRUE.

TRAFFIC_LIMIT

I have a premium plan, configured payment method for apple. Then I buy a subscription via in-app purchase but traffic still limited....after purchasing the Subscription then receipt is not verified on hydra SDK everytime got invalid purchase.Please let me know any solution?

INVALID_PURCHASE_ISSUE

Hey,
I have query I am using Non-renewing subscription so this subscription I am not able to make payment and getting error "INVALID PURCHASE".if I purchase by Auto renew Subscription then its working fine.Please help!

Wifi disconnects on Switching VPN ON

Hi,

I am running the latest sample app. When I press on Start VPN, the Wifi connection on the device is getting turned off .
Can you please help ?

Please find the logs below.

HydraSDKDemo[1530:340933] Manager is created and loaded with error: (null)
HydraSDKDemo[1530:341261] [] Failed to fetch info with type 2: Connection invalid
HydraSDKDemo[1530:341261] [] Failed to fetch info with type 2: Connection invalid
HydraSDKDemo[1530:341261] [] nw_connection_write_close 6 Connection is not ready, sending error callback
HydraSDKDemo[1530:341261] [] __tcp_connection_write_eof_block_invoke Write close callback received error: [57] Socket is not connected
HydraSDKDemo[1530:341261] [] Failed to fetch info with type 2: Connection interrupted

Bandwidth issue in premium account for Google(Android)

As per documentation, we have created a API Access and service account for the purchase info and also provided all relevant access on google console and cloud console

But when we are updating the below json, its always returning "failed to parse purchase settings"

{
"credentials": {
"type": "service_account",
"project_id": "api-3333333333333333333-333333",
"private_key_id": "3333333333333333333333333333333333333333",
"private_key": "-----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC3eWGUsgiwXzEG ...= -----END PRIVATE KEY----- ",
"client_email": "perchaseverification@api-8590733015157495171-576381.iam.gserviceaccount.com",
"client_id": "110405678044800470496",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/perchaseverification%40api-1111111115157495171-511181.iam.gserviceaccount.com"
},
"application": "AnchorFree-Backend/1.0"
}

VPNSDKError code = 0; Empty token

Good afternoon, I have an IPsec vpn server where there is IP data 62.233.23 .... As I understand it, this must be entered in the HostUrl section

As well as the password and username, but where to enter these data to connect to the server?

I suppose you need to use the authentication method, but there is no field for entering a password or login, but there are only some tokens, I don’t know what to do with tokens

Can you please help me?

SDK Error Xcode 11

Error importing the modules in Xcode 11 - they are built with Swift 5.0.1 and can’t be used with the 5.1.0 compiler.

Please provide updated SDK’s or a way we can build using Carthage or Cocoapods.

Failed to connect

Failed to connect to Hydra. Error was: Error Domain=com.anchorfree.hydra.manager Code=4 "failed_to_connect" UserInfo={NSLocalizedDescription=failed_to_connect}

TRAFFIC_EXCEED

I have a premium plan, configured payment method for apple. Then I buy a subscription via in-app purchase but traffic still limited. In the purchases tab, it says that "User has no purchases". Any advice?

Is the cocoa pod deprecated ? + missing versions

Today I noticed that pod install throws this error:

[!] CocoaPods could not find compatible versions for pod "VPNApplicationSDK":
  In Podfile:
    VPNApplicationSDK (~> 4.0.3)

None of your spec sources contain a spec satisfying the dependency: `VPNApplicationSDK (~> 4.0.3)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

When I run pod trunk info VPNApplicationSDK I get the following output:

VPNApplicationSDK
    - Versions:
      - 3.1.4 (2020-06-30 10:07:24 UTC)
      - 3.1.5 (2020-09-29 09:29:02 UTC)
      - 3.1.6 (2020-11-10 15:51:12 UTC)
      - 3.1.7 (2020-12-01 08:46:49 UTC)
      - 3.1.8 (2020-12-24 16:26:56 UTC)
      - 3.1.9 (2021-01-18 16:58:15 UTC)
    - Owners:
      - ***redacted***

I have a few questions:
1- Where did 4.0.3 go is this a bug?
2- The cocoapod is now deprecated, what is the alternative ? I'm not finding any replacement ?

Code=4 "failed_to_connect"

Hello!
I logged in successfully, get servers list and when try to connect to closest server I receive error

Restart VPN error: Error Domain=com.anchorfree.hydra.manager Code=4 "failed_to_connect" UserInfo={NSLocalizedDescription=failed_to_connect}

I'm using this code to start VPN

  private func startVPN() {

    self.hydraClient.start(location: nil) { (e, _) in
        if let ex = e {
            print("Restart VPN error: \(ex)")
        } else {
            print("Restart VPN success, country: \(self.country?.code ?? "unknown")")
        }
    }
}

Found an unexpected Mach-O header code: 0x72613c21

ValidateEmbeddedBinary /Users/syedshayanjamal/Library/Developer/Xcode/DerivedData/HydraSDKDemo-bwjloldeuvpmttbjqolvnxbfrxbt/Build/Products/Debug-iphoneos/HydraSDKDemo.app/PlugIns/neprovider.appex (in target 'HydraSDKDemo' from project 'HydraSDKDemo')
cd /Users/syedshayanjamal/Desktop/Development/ODL/practice/new\ vpn/hydrasdk-demo-ios-master
/Applications/Xcode.app/Contents/Developer/usr/bin/embeddedBinaryValidationUtility /Users/syedshayanjamal/Library/Developer/Xcode/DerivedData/HydraSDKDemo-bwjloldeuvpmttbjqolvnxbfrxbt/Build/Products/Debug-iphoneos/HydraSDKDemo.app/PlugIns/neprovider.appex -signing-cert 56972FD7EED56A44390D199F149955F3D3E4B72A -info-plist-path /Users/syedshayanjamal/Library/Developer/Xcode/DerivedData/HydraSDKDemo-bwjloldeuvpmttbjqolvnxbfrxbt/Build/Products/Debug-iphoneos/HydraSDKDemo.app/Info.plist

DEFAULT_COUNTRY_ISSUE

Hey, We have a query, when we connect the VPN by default, not connecting by the selection from the list, which country will automatically connects.

Traffic counters always return 0

Traffic counters works well but at one point stop returning values. Always give 0 for received and transmitted.
Code for counters took from demo.
How to fix this?
Снимок экрана 2021-11-22 в 10 55 10

VPN_RECONNECTION_ISSUE

Hey,
I have a query regarding the reconnection issue -:
When VPN is connected in my device, and i disconnect the wifi at the same time it's connected. When i try to turn the wifi on my device is not able to connect to a wifi and not able to connect VPN.
Is there any Solution to connect the wifi and vpn again ?

Network extension entitlement for free Apple dev account?

Hello,

thanks a lot for the demo.

Is there any theoretical chance to enable "network extension" entitlement for free dev account, without jailbreak?

(I assume not using 0-day(s) available up to iOS 15.0.1 which probably could ease it?)

Kind regards,
is

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.