Improve: clean code
This commit is contained in:
@ -7,7 +7,7 @@ import (
|
||||
C "github.com/Dreamacro/clash/constant"
|
||||
)
|
||||
|
||||
func (t *Tunnel) handleHTTP(request *adapters.HttpAdapter, proxy C.ProxyAdapter) {
|
||||
func (t *Tunnel) handleHTTP(request *adapters.HTTPAdapter, proxy C.ProxyAdapter) {
|
||||
conn := newTrafficTrack(proxy.Conn(), t.traffic)
|
||||
|
||||
// Before we unwrap src and/or dst, copy any buffered data.
|
||||
|
@ -104,7 +104,7 @@ func (t *Tunnel) handleConn(localConn C.ServerAdapter) {
|
||||
defer remoConn.Close()
|
||||
|
||||
switch adapter := localConn.(type) {
|
||||
case *LocalAdapter.HttpAdapter:
|
||||
case *LocalAdapter.HTTPAdapter:
|
||||
t.handleHTTP(adapter, remoConn)
|
||||
case *LocalAdapter.SocksAdapter:
|
||||
t.handleSOCKS(adapter, remoConn)
|
||||
|
Reference in New Issue
Block a user