Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Send a RADIUS Access-Request and print the response code.
package main
import (
"context"
"log"
"layeh.com/radius"
"layeh.com/radius/rfc2865"
)
func main() {
packet := radius.New(radius.CodeAccessRequest, []byte("secret"))
rfc2865.UserName_SetString(packet, "user")
rfc2865.UserPassword_SetString(packet, "pass")
response, err := radius.Exchange(context.Background(), packet, "localhost:1812")
if err != nil {
log.Fatal(err)
}
log.Printf("Response code: %v", response.Code)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20231213012653-1006025d24f8latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.