mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
fix: tproxy cannot start and load balance panic
This commit is contained in:
1 parent
5cc0f869b7
commit
ebb6bca65c
2 files changed
+7
-2
No files matched your search
@@ -184,7 +184,7 @@ ip -6 rule del fwmark 1 table 100
|
||||
ip -6 route del local ::/0 dev lo table 100
|
||||
|
||||
ip6tables -w 2 -t mangle -F SSTP_ONCE
|
||||
ip6tables -w 2 -t mangle -D PREROUTING -m socket -j SSTP_ONCE
|
||||
ip6tables -w 2 -t mangle -D PREROUTING -m socket --restore-skmark -j SSTP_ONCE
|
||||
ip6tables -w 2 -t mangle -X SSTP_ONCE
|
||||
ip6tables -w 2 -t mangle -F TP_OUT
|
||||
ip6tables -w 2 -t mangle -D OUTPUT -j TP_OUT
|
||||
|
||||
@@ -63,6 +63,7 @@ func getObservatoryResponse(conn *grpc.ClientConn) (r *pb.GetOutboundStatusRespo
|
||||
func observatoryProducer() {
|
||||
const product = "observatory"
|
||||
var conn *grpc.ClientConn
|
||||
nextLoop:
|
||||
for {
|
||||
if ApiPort() == 0 {
|
||||
time.Sleep(ApiFeedInterval)
|
||||
@@ -91,7 +92,11 @@ func observatoryProducer() {
|
||||
css := configure.GetConnectedServers()
|
||||
for i := range outboundStatus {
|
||||
_ = mapper.AutoMapper(outboundStatus[i], &os[i])
|
||||
os[i].Which = css.Get()[tag2WhichIndex[os[i].OutboundTag]]
|
||||
index := tag2WhichIndex[os[i].OutboundTag]
|
||||
if index >= css.Len() {
|
||||
continue nextLoop
|
||||
}
|
||||
os[i].Which = css.Get()[index]
|
||||
}
|
||||
ApiFeed.ProductMessage(product, os)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user