Release Argo Tunnel Client 2018.4.4
This commit is contained in:
parent
3dc84750c7
commit
9bbeed7707
|
@ -275,7 +275,7 @@ func main() {
|
|||
Usage: "Run a DNS over HTTPS proxy server.",
|
||||
EnvVars: []string{"TUNNEL_DNS"},
|
||||
}),
|
||||
altsrc.NewUintFlag(&cli.UintFlag{
|
||||
altsrc.NewIntFlag(&cli.IntFlag{
|
||||
Name: "proxy-dns-port",
|
||||
Value: 53,
|
||||
Usage: "Listen on given port for the DNS over HTTPS proxy server.",
|
||||
|
@ -290,7 +290,7 @@ func main() {
|
|||
altsrc.NewStringSliceFlag(&cli.StringSliceFlag{
|
||||
Name: "proxy-dns-upstream",
|
||||
Usage: "Upstream endpoint URL, you can specify multiple endpoints for redundancy.",
|
||||
Value: cli.NewStringSlice("https://cloudflare-dns.com/dns-query"),
|
||||
Value: cli.NewStringSlice("https://1.1.1.1/dns-query", "https://1.0.0.1/dns-query"),
|
||||
EnvVars: []string{"TUNNEL_DNS_UPSTREAM"},
|
||||
}),
|
||||
altsrc.NewDurationFlag(&cli.DurationFlag{
|
||||
|
@ -384,7 +384,7 @@ func main() {
|
|||
&cli.StringSliceFlag{
|
||||
Name: "upstream",
|
||||
Usage: "Upstream endpoint URL, you can specify multiple endpoints for redundancy.",
|
||||
Value: cli.NewStringSlice("https://cloudflare-dns.com/dns-query"),
|
||||
Value: cli.NewStringSlice("https://1.1.1.1/dns-query", "https://1.0.0.1/dns-query"),
|
||||
EnvVars: []string{"TUNNEL_DNS_UPSTREAM"},
|
||||
},
|
||||
},
|
||||
|
@ -428,8 +428,12 @@ func startServer(c *cli.Context) {
|
|||
}
|
||||
|
||||
if c.IsSet("proxy-dns") {
|
||||
port := c.Int("proxy-dns-port")
|
||||
if port <= 0 || port > 65535 {
|
||||
Log.Fatal("The 'proxy-dns-port' must be a valid port number in <1, 65535> range.")
|
||||
}
|
||||
wg.Add(1)
|
||||
listener, err := tunneldns.CreateListener(c.String("proxy-dns-address"), uint16(c.Uint("proxy-dns-port")), c.StringSlice("proxy-dns-upstream"))
|
||||
listener, err := tunneldns.CreateListener(c.String("proxy-dns-address"), uint16(port), c.StringSlice("proxy-dns-upstream"))
|
||||
if err != nil {
|
||||
close(dnsReadySignal)
|
||||
listener.Stop()
|
||||
|
|
|
@ -8,6 +8,10 @@ type AtomicCounter struct {
|
|||
count uint64
|
||||
}
|
||||
|
||||
func NewAtomicCounter(initCount uint64) *AtomicCounter{
|
||||
return &AtomicCounter{count: initCount}
|
||||
}
|
||||
|
||||
func (c *AtomicCounter) IncrementBy(number uint64) {
|
||||
atomic.AddUint64(&c.count, number)
|
||||
}
|
||||
|
|
|
@ -140,6 +140,8 @@ func Handshake(
|
|||
updateSendWindowChan := make(chan uint32, 1)
|
||||
updateInBoundBytesChan := make(chan uint64)
|
||||
updateOutBoundBytesChan := make(chan uint64)
|
||||
inBoundCounter := NewAtomicCounter(0)
|
||||
outBoundCounter := NewAtomicCounter(0)
|
||||
pingTimestamp := NewPingTimestamp()
|
||||
connActive := NewSignal()
|
||||
idleDuration := config.HeartbeatInterval
|
||||
|
@ -171,6 +173,7 @@ func Handshake(
|
|||
updateRTTChan: updateRTTChan,
|
||||
updateReceiveWindowChan: updateReceiveWindowChan,
|
||||
updateSendWindowChan: updateSendWindowChan,
|
||||
bytesRead: inBoundCounter,
|
||||
updateInBoundBytesChan: updateInBoundBytesChan,
|
||||
}
|
||||
m.muxWriter = &MuxWriter{
|
||||
|
@ -187,6 +190,7 @@ func Handshake(
|
|||
maxFrameSize: defaultFrameSize,
|
||||
updateReceiveWindowChan: updateReceiveWindowChan,
|
||||
updateSendWindowChan: updateSendWindowChan,
|
||||
bytesWrote: outBoundCounter,
|
||||
updateOutBoundBytesChan: updateOutBoundBytesChan,
|
||||
}
|
||||
m.muxWriter.headerEncoder = hpack.NewEncoder(&m.muxWriter.headerBuffer)
|
||||
|
|
|
@ -42,7 +42,7 @@ type MuxReader struct {
|
|||
// updateSendWindowChan is the channel to update sendWindow size to muxerMetricsUpdater
|
||||
updateSendWindowChan chan<- uint32
|
||||
// bytesRead is the amount of bytes read from data frame since the last time we send bytes read to metrics
|
||||
bytesRead AtomicCounter
|
||||
bytesRead *AtomicCounter
|
||||
// updateOutBoundBytesChan is the channel to send bytesWrote to muxerMetricsUpdater
|
||||
updateInBoundBytesChan chan<- uint64
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ type MuxWriter struct {
|
|||
// updateSendWindowChan is the channel to update sendWindow size to muxerMetricsUpdater
|
||||
updateSendWindowChan chan<- uint32
|
||||
// bytesWrote is the amount of bytes wrote to data frame since the last time we send bytes wrote to metrics
|
||||
bytesWrote AtomicCounter
|
||||
bytesWrote *AtomicCounter
|
||||
// updateOutBoundBytesChan is the channel to send bytesWrote to muxerMetricsUpdater
|
||||
updateOutBoundBytesChan chan<- uint64
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue