diff --git a/Makefile b/Makefile index 17a7512923..07509e76fa 100644 --- a/Makefile +++ b/Makefile @@ -12,18 +12,17 @@ IMPORT_PATH=$(IMPORT_HOST)/Jigsaw-Code/outline-apps all: android apple linux windows ROOT_PKG=client/src/tun2socks -# Don't strip Android debug symbols so we can upload them to crash reporting tools. -ANDROID_BUILD_CMD=$(GOBIND) -a -ldflags '-w' -target=android -androidapi 19 -tags android -work android: $(BUILDDIR)/android/tun2socks.aar $(BUILDDIR)/android/tun2socks.aar: $(GOMOBILE) mkdir -p "$(BUILDDIR)/android" - $(ANDROID_BUILD_CMD) -o "$@" $(IMPORT_PATH)/$(ROOT_PKG)/outline/tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/shadowsocks + # Don't strip Android debug symbols so we can upload them to crash reporting tools. + $(GOBIND) -target=android -androidapi 19 -tags android -work -a -ldflags '-w' -o "$@" $(IMPORT_PATH)/$(ROOT_PKG)/outline/tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/shadowsocks $(BUILDDIR)/ios/Tun2socks.xcframework: $(GOMOBILE) # -iosversion should match what outline-client supports. - $(GOBIND) -iosversion=12.0 -target=ios,iossimulator -o $@ -ldflags '-w' -bundleid org.outline.tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/shadowsocks + $(GOBIND) -target=ios,iossimulator -iosversion=12.0 -bundleid org.outline.tun2socks -ldflags '-w' -o "$@" $(IMPORT_PATH)/$(ROOT_PKG)/outline/tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/shadowsocks $(BUILDDIR)/macos/Tun2socks.xcframework: $(GOMOBILE) # MACOSX_DEPLOYMENT_TARGET and -iosversion should match what outline-client supports. @@ -35,40 +34,32 @@ $(BUILDDIR)/apple/Tun2socks.xcframework: $(BUILDDIR)/ios/Tun2socks.xcframework $ find $^ -name "Tun2socks.framework" -type d | xargs -I {} echo " -framework {} " | \ xargs xcrun xcodebuild -create-xcframework -output "$@" -XGO=$(GOBIN)/xgo TUN2SOCKS_VERSION=v1.16.11 -XGO_LDFLAGS='-w -X main.version=$(TUN2SOCKS_VERSION)' -ELECTRON_PKG=$(ROOT_PKG)/outline/electron +# -w disable DWARF generation +LDFLAGS='-static -w -X main.version=$(TUN2SOCKS_VERSION)' +ELECTRON_PKG="./client/src/tun2socks/outline/electron" # TODO: build directly when on linux LINUX_BUILDDIR=$(BUILDDIR)/linux linux: $(LINUX_BUILDDIR)/tun2socks -$(LINUX_BUILDDIR)/tun2socks: $(XGO) - mkdir -p "$(LINUX_BUILDDIR)/$(IMPORT_PATH)" - $(XGO) -ldflags $(XGO_LDFLAGS) --targets=linux/amd64 -dest "$(LINUX_BUILDDIR)" -pkg $(ELECTRON_PKG) . - mv "$(LINUX_BUILDDIR)/$(IMPORT_PATH)-linux-amd64" "$@" - rm -r "$(LINUX_BUILDDIR)/$(IMPORT_HOST)" +$(LINUX_BUILDDIR)/tun2socks: + mkdir -p "$(@D)" + GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC='zig cc -target x86_64-linux' go build -trimpath -ldflags=--extldflags=$(LDFLAGS) -o "$@" $(ELECTRON_PKG) # TODO: build directly when on windows WINDOWS_BUILDDIR=$(BUILDDIR)/windows windows: $(WINDOWS_BUILDDIR)/tun2socks.exe -$(WINDOWS_BUILDDIR)/tun2socks.exe: $(XGO) - mkdir -p "$(WINDOWS_BUILDDIR)/$(IMPORT_PATH)" - $(XGO) -ldflags $(XGO_LDFLAGS) --targets=windows/386 -dest "$(WINDOWS_BUILDDIR)" -pkg $(ELECTRON_PKG) . - mv "$(WINDOWS_BUILDDIR)/$(IMPORT_PATH)-windows-386.exe" "$@" - rm -r "$(WINDOWS_BUILDDIR)/$(IMPORT_HOST)" - +$(WINDOWS_BUILDDIR)/tun2socks.exe: + mkdir -p "$(@D)" + GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC='zig cc -target x86_64-windows' go build -trimpath -ldflags=--extldflags=$(LDFLAGS) -o "$@" $(ELECTRON_PKG) $(GOMOBILE): go.mod - env GOBIN="$(GOBIN)" go install golang.org/x/mobile/cmd/gomobile - env GOBIN="$(GOBIN)" $(GOMOBILE) init - -$(XGO): go.mod - env GOBIN="$(GOBIN)" go install github.com/crazy-max/xgo + mkdir -p "$(@D)" + go build -o "$(@D)" golang.org/x/mobile/cmd/gomobile golang.org/x/mobile/cmd/gobind go.mod: tools.go go mod tidy diff --git a/client/resources/icons/osx/icon-1024.png b/client/resources/icons/osx/icon-1024.png new file mode 100644 index 0000000000..ccb647c052 Binary files /dev/null and b/client/resources/icons/osx/icon-1024.png differ diff --git a/client/resources/icons/osx/icon-128.png b/client/resources/icons/osx/icon-128.png new file mode 100644 index 0000000000..c9c3a0dfb8 Binary files /dev/null and b/client/resources/icons/osx/icon-128.png differ diff --git a/client/resources/icons/osx/icon-16.png b/client/resources/icons/osx/icon-16.png new file mode 100644 index 0000000000..a5fee7259a Binary files /dev/null and b/client/resources/icons/osx/icon-16.png differ diff --git a/client/resources/icons/osx/icon-256.png b/client/resources/icons/osx/icon-256.png new file mode 100644 index 0000000000..472403ce8e Binary files /dev/null and b/client/resources/icons/osx/icon-256.png differ diff --git a/client/resources/icons/osx/icon-32.png b/client/resources/icons/osx/icon-32.png new file mode 100644 index 0000000000..c58d7049aa Binary files /dev/null and b/client/resources/icons/osx/icon-32.png differ diff --git a/client/resources/icons/osx/icon-512.png b/client/resources/icons/osx/icon-512.png new file mode 100644 index 0000000000..1f99a356a2 Binary files /dev/null and b/client/resources/icons/osx/icon-512.png differ diff --git a/client/resources/original_messages.json b/client/resources/original_messages.json index 2f1b9cd72c..402e2690d3 100644 --- a/client/resources/original_messages.json +++ b/client/resources/original_messages.json @@ -485,6 +485,24 @@ } } }, + "server_create_your_own_zero_state_access": { + "description": "When the user has not yet added a server to the application, the main page shows this message at the bottom.", + "message": "Don’t have a server?$NEW_LINE$Create your own at $START_OF_LINK$our website$END_OF_LINK$ or$NEW_LINE$request an $START_OF_LINK2$access key$END_OF_LINK$.", + "placeholders": { + "END_OF_LINK": { + "content": "{closeLink}" + }, + "NEW_LINE": { + "content": "
" + }, + "START_OF_LINK": { + "content": "{openLink}" + }, + "START_OF_LINK2": { + "content": "{openLink2}" + } + } + }, "server_default_name": { "description": "This is the default name for an added server when the type or name is not specified by the access key.", "message": "Proxy Server" diff --git a/client/src/www/app/app.ts b/client/src/www/app/app.ts index e5802c0633..341d9f3eb3 100644 --- a/client/src/www/app/app.ts +++ b/client/src/www/app/app.ts @@ -122,7 +122,7 @@ export class App { document.addEventListener('resume', this.syncConnectivityStateToServerCards.bind(this)); // Register handlers for events fired by Polymer components. - this.rootEl.addEventListener('PromptAddServerRequested', this.requestPromptAddServer.bind(this)); + this.rootEl.$.serversView.addEventListener('add-server', this.requestPromptAddServer.bind(this)); this.rootEl.addEventListener('AddServerConfirmationRequested', this.requestAddServerConfirmation.bind(this)); this.rootEl.addEventListener('AddServerRequested', this.requestAddServer.bind(this)); this.rootEl.addEventListener('IgnoreServerRequested', this.requestIgnoreServer.bind(this)); @@ -300,7 +300,6 @@ export class App { } private requestPromptAddServer() { - this.rootEl.promptAddServer(); this.pullClipboardText(); } @@ -440,7 +439,7 @@ export class App { console.error(`Failed to read auto-connect dialog status, assuming not dismissed: ${e}`); } if (!dismissed) { - this.rootEl.$.serversView.$.autoConnectDialog.show(); + this.rootEl.$.autoConnectDialog.show(); } } diff --git a/client/src/www/ui_components/app-root.js b/client/src/www/ui_components/app-root.js index f9183d4052..dae3997229 100644 --- a/client/src/www/ui_components/app-root.js +++ b/client/src/www/ui_components/app-root.js @@ -339,7 +339,14 @@ export class AppRoot extends mixinBehaviors([AppLocalizeBehavior], PolymerElemen - +