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

Could I get localStorage data in swift ? #1829

Open
suki-neithnet opened this issue Feb 1, 2024 · 7 comments
Open

Could I get localStorage data in swift ? #1829

suki-neithnet opened this issue Feb 1, 2024 · 7 comments

Comments

@suki-neithnet
Copy link

I need to read dynamic data from webview in swift before the vpn start connection. So I wonder know is there any ways to read data from localstorage.

@suki-neithnet suki-neithnet changed the title Could I get data from localstorage in .swift ? Could I get localstorage data in swift ? Feb 1, 2024
@suki-neithnet suki-neithnet changed the title Could I get localstorage data in swift ? Could I get localStorage data in swift ? Feb 1, 2024
@daniellacosse daniellacosse self-assigned this Feb 12, 2024
@daniellacosse
Copy link
Contributor

I think you can set something up where you send the info you need over IPC. https://github.com/Jigsaw-Code/outline-client/blob/6356371797cf882a9472f8be4aa9f8c7bbfb3d21/src/www/app/cordova_main.ts#L52-L53

@suki-neithnet
Copy link
Author

Sorry but I have no idea how to do with these, could you please show me a simple sample if could? Thank you very much.
I need to read localstorage data in OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift or OutlineAppleLib/Sources/OutlineTunnel/OutlineTunnel.swift

@daniellacosse
Copy link
Contributor

What's your goal?

@suki-neithnet
Copy link
Author

suki-neithnet commented Feb 19, 2024

What's your goal?

I need to get different settings info by user while setup vpn every time before connect.

@daniellacosse
Copy link
Contributor

What's your goal?

I need to get different settings info by user while setup vpn every time before connect.

But what are the settings for? Can you not do it in the web view?

@suki-neithnet
Copy link
Author

suki-neithnet commented Feb 22, 2024

What's your goal?

I need to get different settings info by user while setup vpn every time before connect.

But what are the settings for? Can you not do it in the web view?

Well, I want to set includedRoutes and excludedRoutes or dnsSettings for different users, so I think maybe I could only get the info dynamically and set it up while every time we setup vpn.

@daniellacosse
Copy link
Contributor

What's your goal?

I need to get different settings info by user while setup vpn every time before connect.

But what are the settings for? Can you not do it in the web view?

Well, I want to set includedRoutes and excludedRoutes or dnsSettings for different users, so I think maybe I could only get the info dynamically and set it up while every time we setup vpn.

You might be able to do this through the dynamic key maybe? https://www.reddit.com/r/outlinevpn/wiki/index/dynamic_access_keys/

Then you'll need to write a plugin (or extend the existing one): https://cordova.apache.org/docs/en/11.x/guide/platforms/ios/plugin.html

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

2 participants