فهرست منبع

Emit notice with split tunnel region

Rod Hynes 11 سال پیش
والد
کامیت
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)
 	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 {
 type noticeObject struct {
 	NoticeType string          `json:"noticeType"`
 	NoticeType string          `json:"noticeType"`
 	Data       json.RawMessage `json:"data"`
 	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)
 		NoticeAlert("failed to install split tunnel routes: %s", err)
 		return
 		return
 	}
 	}
+
+	NoticeSplitTunnelRegion(tunnel.session.clientRegion)
 }
 }
 
 
 // getRoutes makes a web request to download fresh routes data for the
 // getRoutes makes a web request to download fresh routes data for the