mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2026-01-18 14:44:41 +01:00
Upgrade the bridge to 2.2.0
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v2.1.3
|
v2.2.0
|
||||||
@@ -17,9 +17,11 @@ LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
|
|||||||
EXPOSE 25/tcp
|
EXPOSE 25/tcp
|
||||||
EXPOSE 143/tcp
|
EXPOSE 143/tcp
|
||||||
|
|
||||||
|
HEALTHCHECK --timeout=2s CMD nc -z 127.0.0.1 1025 && nc -z 127.0.0.1 1143
|
||||||
|
|
||||||
# Install dependencies and protonmail bridge
|
# Install dependencies and protonmail bridge
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends socat pass libsecret-1-0 ca-certificates curl gosu \
|
&& apt-get install -y --no-install-recommends socat pass libsecret-1-0 ca-certificates curl gosu netcat \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy bash scripts
|
# Copy bash scripts
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ func (f *frontendCLI) loginWithEnv() {
|
|||||||
func (f *frontendCLI) watchEvents() {
|
func (f *frontendCLI) watchEvents() {
|
||||||
errorCh := f.eventListener.ProvideChannel(events.ErrorEvent)
|
errorCh := f.eventListener.ProvideChannel(events.ErrorEvent)
|
||||||
credentialsErrorCh := f.eventListener.ProvideChannel(events.CredentialsErrorEvent)
|
credentialsErrorCh := f.eventListener.ProvideChannel(events.CredentialsErrorEvent)
|
||||||
internetOffCh := f.eventListener.ProvideChannel(events.InternetOffEvent)
|
internetConnChangedCh := f.eventListener.ProvideChannel(events.InternetConnChangedEvent)
|
||||||
internetOnCh := f.eventListener.ProvideChannel(events.InternetOnEvent)
|
|
||||||
addressChangedCh := f.eventListener.ProvideChannel(events.AddressChangedEvent)
|
addressChangedCh := f.eventListener.ProvideChannel(events.AddressChangedEvent)
|
||||||
addressChangedLogoutCh := f.eventListener.ProvideChannel(events.AddressChangedLogoutEvent)
|
addressChangedLogoutCh := f.eventListener.ProvideChannel(events.AddressChangedLogoutEvent)
|
||||||
logoutCh := f.eventListener.ProvideChannel(events.LogoutEvent)
|
logoutCh := f.eventListener.ProvideChannel(events.LogoutEvent)
|
||||||
@@ -121,13 +120,16 @@ func (f *frontendCLI) watchEvents() {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case errorDetails := <-errorCh:
|
case errorDetails := <-errorCh:
|
||||||
fmt.Println("Bridge failed:", errorDetails)
|
logrus.Error("Bridge failed:", errorDetails)
|
||||||
case <-credentialsErrorCh:
|
case <-credentialsErrorCh:
|
||||||
f.notifyCredentialsError()
|
f.notifyCredentialsError()
|
||||||
case <-internetOffCh:
|
case stat := <-internetConnChangedCh:
|
||||||
|
if stat == events.InternetOff {
|
||||||
f.notifyInternetOff()
|
f.notifyInternetOff()
|
||||||
case <-internetOnCh:
|
}
|
||||||
|
if stat == events.InternetOn {
|
||||||
f.notifyInternetOn()
|
f.notifyInternetOn()
|
||||||
|
}
|
||||||
case address := <-addressChangedCh:
|
case address := <-addressChangedCh:
|
||||||
fmt.Printf("Address changed for %s. You may need to reconfigure your email client.", address)
|
fmt.Printf("Address changed for %s. You may need to reconfigure your email client.", address)
|
||||||
case address := <-addressChangedLogoutCh:
|
case address := <-addressChangedLogoutCh:
|
||||||
|
|||||||
Reference in New Issue
Block a user