Feat/unify initializing flow#391
Draft
kp-antonio-yang wants to merge 23 commits intomainfrom
Draft
Conversation
|
Code coverage summary for 329e8c1: ✅ Region coverage 69% passes |
0910ae2 to
7de88cf
Compare
6648517 to
3cd816c
Compare
a23994f to
b3a8910
Compare
3cd816c to
68b221e
Compare
b3a8910 to
5e37c4c
Compare
The `twelf` is not under maintenance it introduced legacy `serde_yaml`(0.8.23). The latest version is 0.9.34, but it was deprecated in March 2024. Such that `struct-patch` introduced and decoupled the deseralizer and config patch function. The flexible way to overlay configs will be easy and maintainable.
0701c9f to
330f52d
Compare
The docments of cli are from Patch struct, remove the redundant default values from clap, so we dont need to difference between user inputs and default values, and all the default valuses are unified from Default trait.
On platforms other than macOS, there is no strict naming rule for the tun interface, so lightway is used as the default. On macOS, a simple assertion is added to catch invalid tun names early, rather than silently NOTE.
Introduce `--generate=<ConfigFormat>` option to lightway-client, it will be nice for developers to have a full spec to know the all parameters for integration, and also add a dummy ConfigFormat::JsonSchema with todo! as our next move.
The `.schema.json` is generated from client side cli, such that jsonschema can help on integration. - Add test cases for our customized duration types - Add test cases for ByteSize
Add config mod, which providing sharing Configs for mobile and cli clients, and unify all the config utils for clients. - MobileConfig is a small set of Config with less fields adepted to UniFFI, rename from `mobile::LightwayUserSettings` - MobileConnectionConfig is a small set of ConnectionConfig adepted to UniFFI, renamed from `endpoint::RustEndpointConfig` - Add apply methods for MobileConfig, MobileConnectionConfig to Config, ConnectionConfig - Sharing ConnectionConfig for mobile - Collecting and sharing basic operations(`take_auth`, `load_ca`, ...) of configs for all clients
330f52d to
a0ebedc
Compare
68b221e to
41adf70
Compare
ExptesslaneState and DeviceNetworkState are also part of interfaces. Such that we put state.rs a mod.
Rename the VpnConnection and Logger of mobile library for simple, the Rust prefix is moved
41adf70 to
e3ab218
Compare
Because the type checking is working on ClientConnectionConfig, we can use loose type of server_ip field for MobileConnectionConfig
643eea5 to
fe92673
Compare
7737cc1 to
5294904
Compare
Pass field meta information of json schema to client, such that mobile clients can based on the meta information to show the field really works in mobile client - pass textview format for larger String field - pass password format for credentials String field - pass x-cfg information - add example for durations and socket address fields
By adding a config_content input, the mobile will easy to apply yaml configs as the same as cli client using, such that we can easy to treat all clients in a unify way.
The build and clean command in dev shell will always run on project root.
fe92673 to
5576688
Compare
aadd532 to
c0b4a48
Compare
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mobile and CLI clients currently diverge in their state management, configuration structure, and naming conventions. This PR aligns the two, unifying the network initialization flow and establishing a consistent interface across both clients.
Motivation and Context
Following are the context and flow chart.
How Has This Been Tested?
Follow current test cases
Types of changes
Checklist:
main