We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hi, How to set different clients to use different secret authentication, like freeradius.
The text was updated successfully, but these errors were encountered:
You can implement the SecretSource interface and set it as SecretSource:
SecretSource
https://godoc.org/layeh.com/radius#SecretSource
Sorry, something went wrong.
Example implementation:
type HostSecrets struct { Secrets map[string][]byte } func (s *HostSecrets) RADIUSSecret(ctx context.Context, remoteAddr net.Addr) ([]byte, error) { host, _, err := net.SplitHostPort(remoteAddr.String()) if err != nil { return nil, err } return s.Secrets[host], nil }
h := &HostSecrets{ Secrets: map[string][]byte{ "::1": []byte(`12345`), "127.0.0.1": []byte(`12345`), "10.0.0.2": []byte(`67890`), }, }
It's ok, thank you. but, whether the secret is correct or not, it will be executed 'Handler'.
Can I use network segment? Example:
h := &HostSecrets{ Secrets: map[string][]byte{ "::1": []byte(`12345`), "10.0.0.0/24": []byte(`67890`), }, }
No branches or pull requests
hi,
How to set different clients to use different secret authentication, like freeradius.
The text was updated successfully, but these errors were encountered: