tsnet: add Server.AdvertiseTags option (#15840)

Updates #8531

Change-Id: I9b6653872c66929e692bd592ef3f438430c657b5
Signed-off-by: Valentin Alekseev <valentin.alekseev@gmail.com>
Co-authored-by: Valentin Alekseev <valentin.alekseev@gmail.com>
pull/16931/head
Mohammed Naser 4 months ago committed by GitHub
parent 86a5292c03
commit fa0e83ab4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -124,6 +124,13 @@ type Server struct {
// field at zero unless you know what you are doing.
Port uint16
// AdvertiseTags specifies groups that this embedded server wants to join, for
// purposes of ACL enforcement. These can be referenced from the ACL
// security policy. Note that advertising a tag doesn't guarantee that
// the control server will allow you to take on the rights for that
// tag.
AdvertiseTags []string
getCertForTesting func(*tls.ClientHelloInfo) (*tls.Certificate, error)
initOnce sync.Once
@ -662,6 +669,7 @@ func (s *Server) start() (reterr error) {
prefs.WantRunning = true
prefs.ControlURL = s.ControlURL
prefs.RunWebClient = s.RunWebClient
prefs.AdvertiseTags = s.AdvertiseTags
authKey := s.getAuthKey()
err = lb.Start(ipn.Options{
UpdatePrefs: prefs,

Loading…
Cancel
Save