mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			676 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			676 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
 | 
						|
 | 
						|
package nodeconfigs
 | 
						|
 | 
						|
const DefaultHTTP3Port = 443
 | 
						|
 | 
						|
type HTTP3Policy struct {
 | 
						|
	IsOn                  bool `yaml:"isOn" json:"isOn"`
 | 
						|
	Port                  int  `yaml:"port" json:"port"`
 | 
						|
	SupportMobileBrowsers bool `yaml:"supportMobileBrowsers" json:"supportMobileBrowsers"` // enable http/3 on common mobile browsers
 | 
						|
}
 | 
						|
 | 
						|
func NewHTTP3Policy() *HTTP3Policy {
 | 
						|
	return &HTTP3Policy{
 | 
						|
		Port:                  DefaultHTTP3Port,
 | 
						|
		SupportMobileBrowsers: false,
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
func (this *HTTP3Policy) Init() error {
 | 
						|
	if this.Port <= 0 {
 | 
						|
		this.Port = DefaultHTTP3Port
 | 
						|
	}
 | 
						|
	return nil
 | 
						|
}
 |