Skip to content

Commit

Permalink
refactor: remove unused alwaysSplitHTTPS flag (#506)
Browse files Browse the repository at this point in the history
The code that modifies the `alwaysSplitHTTPS` flag has been removed in #241 . So now it will always be `false`, and there is no need to keep that branch any more.
  • Loading branch information
jyyi1 authored Mar 14, 2024
1 parent 8f10f18 commit b538d23
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Android/app/src/go/intra/stream_dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ import (
)

type intraStreamDialer struct {
fakeDNSAddr netip.AddrPort
dns atomic.Pointer[doh.Resolver]
dialer *net.Dialer
alwaysSplitHTTPS atomic.Bool
listener TCPListener
sniReporter *tcpSNIReporter
fakeDNSAddr netip.AddrPort
dns atomic.Pointer[doh.Resolver]
dialer *net.Dialer
listener TCPListener
sniReporter *tcpSNIReporter
}

var _ transport.StreamDialer = (*intraStreamDialer)(nil)
Expand Down Expand Up @@ -96,12 +95,8 @@ func (sd *intraStreamDialer) SetDNS(dns doh.Resolver) error {

func (sd *intraStreamDialer) dial(ctx context.Context, dest netip.AddrPort, stats *TCPSocketSummary) (transport.StreamConn, error) {
if dest.Port() == 443 {
if sd.alwaysSplitHTTPS.Load() {
return split.DialWithSplit(sd.dialer, net.TCPAddrFromAddrPort(dest))
} else {
stats.Retry = &split.RetryStats{}
return split.DialWithSplitRetry(ctx, sd.dialer, net.TCPAddrFromAddrPort(dest), stats.Retry)
}
stats.Retry = &split.RetryStats{}
return split.DialWithSplitRetry(ctx, sd.dialer, net.TCPAddrFromAddrPort(dest), stats.Retry)
} else {
tcpsd := &transport.TCPStreamDialer{
Dialer: *sd.dialer,
Expand Down

0 comments on commit b538d23

Please sign in to comment.