|
@@ -2548,12 +2548,20 @@ func (controller *Controller) runInproxyProxy() {
|
|
|
|
|
|
|
|
compatibleNetwork := IsInproxyCompatibleNetworkType(controller.config.GetNetworkID())
|
|
compatibleNetwork := IsInproxyCompatibleNetworkType(controller.config.GetNetworkID())
|
|
|
|
|
|
|
|
- if !allowProxy || !compatibleNetwork {
|
|
|
|
|
|
|
+ // Running an unstream proxy is also an incompatible case.
|
|
|
|
|
+
|
|
|
|
|
+ useUpstreamProxy := controller.config.UseUpstreamProxy()
|
|
|
|
|
+
|
|
|
|
|
+ if !allowProxy || !compatibleNetwork || useUpstreamProxy {
|
|
|
if !allowProxy {
|
|
if !allowProxy {
|
|
|
NoticeError("inproxy proxy: not allowed")
|
|
NoticeError("inproxy proxy: not allowed")
|
|
|
- } else {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if !compatibleNetwork {
|
|
|
NoticeError("inproxy proxy: not run due to incompatible network")
|
|
NoticeError("inproxy proxy: not run due to incompatible network")
|
|
|
}
|
|
}
|
|
|
|
|
+ if useUpstreamProxy {
|
|
|
|
|
+ NoticeError("inproxy proxy: not run due to upstream proxy configuration")
|
|
|
|
|
+ }
|
|
|
if controller.config.DisableTunnels {
|
|
if controller.config.DisableTunnels {
|
|
|
// Signal failure -- and shutdown -- only if running in proxy-only mode. If also
|
|
// Signal failure -- and shutdown -- only if running in proxy-only mode. If also
|
|
|
// running a tunnel, keep running without proxies.
|
|
// running a tunnel, keep running without proxies.
|