mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-14 05:59:42 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
559b82b60b |
@@ -172,13 +172,13 @@ func (h *HealthPing) doCheck(ctx context.Context, tags []string, duration time.D
|
|||||||
for _, tag := range tags {
|
for _, tag := range tags {
|
||||||
handler := tag
|
handler := tag
|
||||||
client := newPingClient(
|
client := newPingClient(
|
||||||
ctx,
|
h.ctx,
|
||||||
h.dispatcher,
|
h.dispatcher,
|
||||||
h.Settings.Destination,
|
h.Settings.Destination,
|
||||||
h.Settings.Timeout,
|
h.Settings.Timeout,
|
||||||
handler,
|
handler,
|
||||||
)
|
)
|
||||||
for range rounds {
|
for i := 0; i < rounds; i++ {
|
||||||
delay := time.Duration(0)
|
delay := time.Duration(0)
|
||||||
if duration > 0 {
|
if duration > 0 {
|
||||||
delay = time.Duration(dice.RollInt63n(int64(duration)))
|
delay = time.Duration(dice.RollInt63n(int64(duration)))
|
||||||
|
|||||||
@@ -121,6 +121,13 @@ func (s *Server) Process(ctx context.Context, network net.Network, conn stat.Con
|
|||||||
writer: conn,
|
writer: conn,
|
||||||
addr: addr.NetAddr(),
|
addr: addr.NetAddr(),
|
||||||
}
|
}
|
||||||
|
ctx = log.ContextWithAccessMessage(ctx, &log.AccessMessage{
|
||||||
|
From: conn.RemoteAddr(),
|
||||||
|
To: addr,
|
||||||
|
Status: log.AccessAccepted,
|
||||||
|
Reason: "",
|
||||||
|
Email: inbound.User.Email,
|
||||||
|
})
|
||||||
|
|
||||||
return dispatcher.DispatchLink(ctx, *addr, &transport.Link{
|
return dispatcher.DispatchLink(ctx, *addr, &transport.Link{
|
||||||
Reader: reader,
|
Reader: reader,
|
||||||
|
|||||||
Reference in New Issue
Block a user