mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	国家/地区封禁、省份封禁时支持IP变量
This commit is contained in:
		@@ -1133,6 +1133,8 @@ func (this *HTTPRequest) requestRemoteAddr(supportVar bool) string {
 | 
			
		||||
 | 
			
		||||
// 获取请求的客户端地址列表
 | 
			
		||||
func (this *HTTPRequest) requestRemoteAddrs() (result []string) {
 | 
			
		||||
	result = append(result, this.requestRemoteAddr(true))
 | 
			
		||||
 | 
			
		||||
	// X-Forwarded-For
 | 
			
		||||
	var forwardedFor = this.RawReq.Header.Get("X-Forwarded-For")
 | 
			
		||||
	if len(forwardedFor) > 0 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user