mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-04 19:31:45 +08:00 
			
		
		
		
	尝试下发clash系的h2配置
This commit is contained in:
		@@ -217,6 +217,15 @@ class ClashMeta
 | 
				
			|||||||
                if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
 | 
					                if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if ($server['network'] === 'h2') {
 | 
				
			||||||
 | 
					            $array['network'] = 'h2';
 | 
				
			||||||
 | 
					            if ($server['network_settings']) {
 | 
				
			||||||
 | 
					                $h2Settings = $server['network_settings'];
 | 
				
			||||||
 | 
					                $array['h2-opts'] = [];
 | 
				
			||||||
 | 
					                if (isset($h2Settings['host'])) $array['h2-opts']['host'] = array($h2Settings['host']);
 | 
				
			||||||
 | 
					                if (isset($h2Settings['path'])) $array['h2-opts']['path'] = $h2Settings['path'];
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $array;
 | 
					        return $array;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -217,7 +217,15 @@ class ClashVerge
 | 
				
			|||||||
                if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
 | 
					                if (isset($grpcSettings['serviceName'])) $array['grpc-opts']['grpc-service-name'] = $grpcSettings['serviceName'];
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if ($server['network'] === 'h2') {
 | 
				
			||||||
 | 
					            $array['network'] = 'h2';
 | 
				
			||||||
 | 
					            if ($server['network_settings']) {
 | 
				
			||||||
 | 
					                $h2Settings = $server['network_settings'];
 | 
				
			||||||
 | 
					                $array['h2-opts'] = [];
 | 
				
			||||||
 | 
					                if (isset($h2Settings['host'])) $array['h2-opts']['host'] = array($h2Settings['host']);
 | 
				
			||||||
 | 
					                if (isset($h2Settings['path'])) $array['h2-opts']['path'] = $h2Settings['path'];
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        return $array;
 | 
					        return $array;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user