Просмотр исходного кода

Emit notice with split tunnel region

Rod Hynes 11 лет назад
Родитель
Сommit
07eabd0366
2 измененных файлов с 7 добавлено и 0 удалено
  1. 5 0
      psiphon/notice.go
  2. 2 0
      psiphon/splitTunnel.go

+ 5 - 0
psiphon/notice.go

@@ -169,6 +169,11 @@ func NoticeUntunneled(address string) {
 	outputNotice("Untunneled", true, "address", address)
 }
 
+// NoticeSplitTunnelRegion reports that split tunnel is on for the given region
+func NoticeSplitTunnelRegion(region string) {
+	outputNotice("SplitTunnelRegion", true, "region", region)
+}
+
 type noticeObject struct {
 	NoticeType string          `json:"noticeType"`
 	Data       json.RawMessage `json:"data"`

+ 2 - 0
psiphon/splitTunnel.go

@@ -201,6 +201,8 @@ func (classifier *SplitTunnelClassifier) setRoutes(tunnel *Tunnel) {
 		NoticeAlert("failed to install split tunnel routes: %s", err)
 		return
 	}
+
+	NoticeSplitTunnelRegion(tunnel.session.clientRegion)
 }
 
 // getRoutes makes a web request to download fresh routes data for the