-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
fix: ClientConfig marshals incorrectly #3896
Conversation
Where is the |
I use yaml pkg from |
I don't really want to solve a problem that is not being used in this project. |
here is the story: I tried to update the yaml format frpc config file programmatically by calling After digging the source code, I think there is a missing |
thanks for the quick reply. |
Sounds good. But the problem is that this expands the external commitments of this portion of code. It means that we need to always ensure the consistency of this behavior. It may be achievable now, but will it bring difficulties for future changes? I'm not entirely sure. Additionally, it seems that you haven't modified the usage of all these types of structures, such as visitor and plugin configurations. This is also one of my concerns. For the cases that are not used in the project, we lack sufficient test cases to ensure consistent behavior. |
make sense to me.
|
If the proxy config includes the configuration of a plugin, there may still be issues. |
@free6om any workaround to further support both
Exactly, my use case too :) and am stuck on the same problem! |
WHY
the output of
yaml.Marshal(&ClientConfig{})
is incorrect, this PR fixed this error.How to reproduce it
ClientConfig
objectclientConfig
withProxies
field setyaml.Marshal(&clientConfig)
and set the output toyamlConfig
config.LoadConfigure(yamlConfig, &clientConfig, false)
to unmarshal the outputclientConfig
, theProxies
part is lost