mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	修复在HTTPS下无法连接Websocket的问题
This commit is contained in:
		@@ -55,3 +55,16 @@ func (this *ClientTLSConn) SetReadDeadline(t time.Time) error {
 | 
			
		||||
func (this *ClientTLSConn) SetWriteDeadline(t time.Time) error {
 | 
			
		||||
	return this.rawConn.SetWriteDeadline(t)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (this *ClientTLSConn) SetIsWebsocket(isWebsocket bool) {
 | 
			
		||||
	tlsConn, ok := this.rawConn.(*tls.Conn)
 | 
			
		||||
	if ok {
 | 
			
		||||
		var rawConn = tlsConn.NetConn()
 | 
			
		||||
		if rawConn != nil {
 | 
			
		||||
			clientConn, ok := rawConn.(*ClientConn)
 | 
			
		||||
			if ok {
 | 
			
		||||
				clientConn.SetIsWebsocket(isWebsocket)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user