Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project setup issue : Undefine symbol for openvpn_tunnel #427

Closed
AnitaGVMTechnologies opened this issue Feb 6, 2024 · 3 comments
Closed

Comments

@AnitaGVMTechnologies
Copy link

Hello There
I am new to VPN projects

I need to connect V2ray server using VPN in IOS application and i am refering your code which seems most useful for my developement

but even though i followed all steps of shared in READ.ME file i am unable to go further towords successful builds

Please see attached screenshot and help me out

Screenshot 2024-02-06 at 4 00 38 PM
@jurajhilje
Copy link
Member

jurajhilje commented Feb 8, 2024

Hi

If you are trying to implement V2Ray in your own iOS project, I suggest few things:

  • This project is somewhat complex when it comes to building and running. It has multiple non-native components which have to be compiled from different languages (such as C, C++, Go, etc) and V2Ray is just one of those components. Instead trying to build and run this project, I recommend to go over to v2ray-core instead.

  • /build-v2ray.sh script works OK on my end. It would be very difficult for me to troubleshoot the problem on your side. E.g. error message you pasted above indicates that you did not compile the liboqs library (not related to V2Ray).

  • You can use any code from this project, as long as you don't violate the license.

Good luck!

@AnitaGVMTechnologies
Copy link
Author

Hi @jurajhilje
Here the Kemhelper file gave issues on generateKeys functions

private func generateKeys(algorithm: KemAlgorithm) -> (String, String) {
let kem = OQS_KEM_new(algorithm.rawValue)
let publicKeyLength = OQS_KEM_kyber_1024_length_public_key
let secretKeyLength = OQS_KEM_kyber_1024_length_secret_key
let publicKey = UnsafeMutablePointer.allocate(capacity: Int(publicKeyLength))
let secretKey = UnsafeMutablePointer.allocate(capacity: Int(secretKeyLength))

    OQS_KEM_keypair(kem, publicKey, secretKey)
    
    let publicKeyData = Data(bytes: publicKey, count: Int(publicKeyLength))
    let secretKeyData = Data(bytes: secretKey, count: Int(secretKeyLength))

    OQS_KEM_free(kem)
    publicKey.deallocate()
    secretKey.deallocate()

    return  ("","")//(publicKeyData.base64EncodedString(), secretKeyData.base64EncodedString())
}

compiler gives error at first line :         let kem = OQS_KEM_new(algorithm.rawValue)

If i comment i can able to buil liboq.a

@gauravkeshre
Copy link
Contributor

gauravkeshre commented Feb 8, 2024

@jurajhilje is V2Ray essential for the basic functioning of the app?
I have a VPN server setup and I want to try that in an iOS client app. Can I bypass this step somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants