Skip to content

Commit

Permalink
Rename all occurance of deprecate names
Browse files Browse the repository at this point in the history
  • Loading branch information
liyasthomas committed Feb 17, 2021
1 parent 88f93c1 commit 57c3eb1
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 82 deletions.
76 changes: 26 additions & 50 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
name: Build Proxywoman
name: Build Proxyscotch

on:
push:
tags:
- 'v*'
- "v*"

jobs:

build-linux:
name: Linux Build
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install gcc libgtk-3-dev libappindicator3-dev libwebkit2gtk-4.0-dev
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
- name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run Builds
- name: Run Builds
run: |
rm -rf ./out
./build.sh linux server
Expand All @@ -41,19 +36,15 @@ jobs:
name: Darwin Build
runs-on: macos-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
- name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run Builds
- name: Run Builds
run: |
rm -rf ./out
./build.sh darwin server
Expand All @@ -69,19 +60,15 @@ jobs:
name: Windows Build
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
- name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run Builds
- name: Run Builds
run: |
rm -rf ./out
./build.sh windows server
Expand All @@ -98,34 +85,27 @@ jobs:
runs-on: ubuntu-latest
needs: [build-linux, build-darwin, build-windows]
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
- name: Unshallow
run: git fetch --prune --unshallow
-
name: Prepare Release Directory
- name: Prepare Release Directory
run: mkdir ./release
-
name: Download a Build Artifact
- name: Download a Build Artifact
uses: actions/download-artifact@v2
with:
# Destination path
path: ./release # optional
-
name: Load version information
- name: Load version information
run: |
source ./version.properties
echo "::set-env name=VERSION_NAME::$VERSION_NAME"
echo "::set-env name=VERSION_CODE::$VERSION_CODE"
-
name: Display structure of downloaded files
- name: Display structure of downloaded files
working-directory: ./release
run: |
ls -R
-
name: Create a Release
- name: Create a Release
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -139,39 +119,35 @@ jobs:
body: ""
draft: false
prerelease: false
-
name: Upload Windows Release Assets
- name: Upload Windows Release Assets
id: upload_release_assets_windows
uses: NBTX/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
targets: "./release/artifact/windows-*/*.exe"
-
name: Upload Linux Release Assets
- name: Upload Linux Release Assets
id: upload_release_assets_linux
uses: NBTX/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
targets: "./release/artifact/linux-*/*.!(md)"
-
name: Upload macOS Server Release Assets
- name: Upload macOS Server Release Assets
id: upload_release_assets_darwin_server
uses: NBTX/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
targets: "./release/artifact/darwin-server/*.!(md)"
-
name: Upload macOS Desktop Release Assets
- name: Upload macOS Desktop Release Assets
id: upload_release_assets_darwin
uses: NBTX/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
targets: "./release/artifact/darwin-*/*.zip"
targets: "./release/artifact/darwin-*/*.zip"
14 changes: 7 additions & 7 deletions installers/windows/inno-setup-installer.iss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
; Inno Setup 6.0 Script for the Proxywoman.
; Inno Setup 6.0 Script for the Proxyscotch.
; Created by NBTX.

#define MyAppName "Proxywoman"
#define MyAppName "Proxyscotch"
#define MyAppVersion "1.0"
#define MyAppPublisher "Postwoman.io"
#define MyAppURL "https://postwoman.io/"
#define MyAppExeName "proxywoman.exe"
#define MyAppPublisher "hoppscotch.io"
#define MyAppURL "https://hoppscotch.io/"
#define MyAppExeName "proxyscotch.exe"

[Setup]
; Randomly generated GUID.
Expand All @@ -24,7 +24,7 @@ UsedUserAreasWarning=no
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=..\..\out\windows-desktop\installer
OutputBaseFilename=Install Proxywoman
OutputBaseFilename=Install Proxyscotch
SetupIconFile=..\..\icons\icon.ico
Compression=lzma
SolidCompression=yes
Expand All @@ -38,7 +38,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode

[Files]
Source: "..\..\out\windows-desktop\postwoman-proxy.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\out\windows-desktop\hoppscotch-proxy.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\out\windows-desktop\data"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\out\windows-desktop\icons\*"; DestDir: "{app}\icons"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Expand Down
8 changes: 4 additions & 4 deletions libproxy/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func CreateKeyPair() *[2]bytes.Buffer {
template := x509.Certificate{
SerialNumber: big.NewInt(1),
Subject: pkix.Name{
Organization: []string{"The Postwoman Project"},
Organization: []string{"The Hoppscotch Project"},
},
NotBefore: time.Now(),
// Make certificate expire after 10 years.
Expand Down Expand Up @@ -97,17 +97,17 @@ func EnsurePrivateKeyInstalled() error {
if err == nil {
if runtime.GOOS == "darwin" {
_ = exec.Command("open", GetOrCreateDataPath()).Run()
_, err = dlgs.Warning("Proxywoman", "Proxywoman needs you to install a root certificate authority (cert.pem).\nPlease double-click the certificate file to open it in Keychain Access and follow the installation and trust process.\n\nFor more information about this process and why it's required, please click the Postwoman icon in the status tray and select 'Help'.\n\nClick OK when you have installed the certificate and marked it as trusted.")
_, err = dlgs.Warning("Proxyscotch", "Proxyscotch needs you to install a root certificate authority (cert.pem).\nPlease double-click the certificate file to open it in Keychain Access and follow the installation and trust process.\n\nFor more information about this process and why it's required, please click the Hoppscotch icon in the status tray and select 'Help'.\n\nClick OK when you have installed the certificate and marked it as trusted.")
}

if runtime.GOOS == "windows" {
_ = exec.Command("explorer.exe", GetOrCreateDataPath()+string(os.PathSeparator)+"cert.cer").Run()
_, err = dlgs.Warning("Proxywoman", "Proxywoman needs you to install a root certificate authority (cert.cer).\nPlease install the certificate (opened) into the 'Trusted Root Certification Authorities' store for the Local Machine.\n\nFor more information about this process and why it's required, please click the Postwoman icon in the system tray and select 'Help'.\n\nClick OK when you have installed the certificate and marked it as trusted.")
_, err = dlgs.Warning("Proxyscotch", "Proxyscotch needs you to install a root certificate authority (cert.cer).\nPlease install the certificate (opened) into the 'Trusted Root Certification Authorities' store for the Local Machine.\n\nFor more information about this process and why it's required, please click the Hoppscotch icon in the system tray and select 'Help'.\n\nClick OK when you have installed the certificate and marked it as trusted.")
}

if runtime.GOOS == "linux" {
_ = exec.Command("xdg-open", GetOrCreateDataPath()).Run()
_, err = dlgs.Warning("Proxywoman", "Proxywoman needs you to install a root certificate authority (cert.pem).\n[INSTRUCTIONS PENDING]\n\nFor more information about this process and why it's required, please click the Postwoman icon in the status tray and select 'Help'.\n\nClick OK when you have installed the certificate and marked it as trusted.")
_, err = dlgs.Warning("Proxyscotch", "Proxyscotch needs you to install a root certificate authority (cert.pem).\n[INSTRUCTIONS PENDING]\n\nFor more information about this process and why it's required, please click the Hoppscotch icon in the status tray and select 'Help'.\n\nClick OK when you have installed the certificate and marked it as trusted.")
}
}

Expand Down
2 changes: 1 addition & 1 deletion libproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func proxyHandler(response http.ResponseWriter, request *http.Request) {
proxyRequest.Header.Set(k, v)
}

proxyRequest.Header.Set("User-Agent", "Proxywoman/1.0")
proxyRequest.Header.Set("User-Agent", "Proxyscotch/1.0")

if len(requestData.Data) > 0 {
proxyRequest.Body = ioutil.NopCloser(strings.NewReader(requestData.Data))
Expand Down
30 changes: 15 additions & 15 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {

func onReady() {
systray.SetIcon(icon.Data)
systray.SetTooltip("Proxywoman v" + VersionName + " (" + VersionCode + ") - created by NBTX")
systray.SetTooltip("Proxyscotch v" + VersionName + " (" + VersionCode + ") - created by NBTX")

/** Set up menu items. **/

Expand All @@ -39,8 +39,8 @@ func onReady() {

systray.AddSeparator()

// Open Postwoman Interface
mOpenPostwoman := systray.AddMenuItem("Open Postwoman", "")
// Open Hoppscotch Interface
mOpenHoppscotch := systray.AddMenuItem("Open Hoppscotch", "")

systray.AddSeparator()

Expand All @@ -54,39 +54,39 @@ func onReady() {
systray.AddSeparator()

// Quit Proxy
mQuit := systray.AddMenuItem("Quit Proxywoman", "")
mQuit := systray.AddMenuItem("Quit Proxyscotch", "")

/** Start proxy server. **/
go runPostwomanProxy()
go runHoppscotchProxy()

/** Wait for menu input. **/
for {
select {
case <-mOpenPostwoman.ClickedCh:
_ = browser.OpenURL("https://postwoman.io/")
case <-mOpenHoppscotch.ClickedCh:
_ = browser.OpenURL("https://hoppscotch.io/")

case <-mCopyAccessToken.ClickedCh:
_ = clipboard.WriteAll(libproxy.GetAccessToken())
_ = notifier.Notify("Proxywoman", "Proxy Access Token copied...", "The Proxy Access Token has been copied to your clipboard.", notifier.GetIcon())
_ = notifier.Notify("Proxyscotch", "Proxy Access Token copied...", "The Proxy Access Token has been copied to your clipboard.", notifier.GetIcon())

case <-mViewHelp.ClickedCh:
_ = browser.OpenURL("https://github.com/postwoman-io/proxywoman/wiki")
_ = browser.OpenURL("https://github.com/hoppscotch/proxyscotch/wiki")

case <-mSetAccessToken.ClickedCh:
newAccessToken, success := inputbox.InputBox("Proxywoman", "Please enter the new Proxy Access Token...\n(Leave this blank to disable access checks.)", "")
newAccessToken, success := inputbox.InputBox("Proxyscotch", "Please enter the new Proxy Access Token...\n(Leave this blank to disable access checks.)", "")
if success {
libproxy.SetAccessToken(newAccessToken)

if len(newAccessToken) == 0 {
_ = notifier.Notify("Proxywoman", "Proxy Access check disabled.", "**Anyone can access your proxy server!** The Proxy Access Token check has been disabled.", notifier.GetIcon())
_ = notifier.Notify("Proxyscotch", "Proxy Access check disabled.", "**Anyone can access your proxy server!** The Proxy Access Token check has been disabled.", notifier.GetIcon())
} else {
_ = notifier.Notify("Proxywoman", "Proxy Access Token updated...", "The Proxy Access Token has been updated.", notifier.GetIcon())
_ = notifier.Notify("Proxyscotch", "Proxy Access Token updated...", "The Proxy Access Token has been updated.", notifier.GetIcon())
}
}

case <-mUpdateCheck.ClickedCh:
// TODO: Add update check.
_ = browser.OpenURL("https://github.com/NBTX/postwoman-proxy")
_ = browser.OpenURL("https://github.com/hoppscotch/proxyscotch")

case <-mQuit.ClickedCh:
systray.Quit()
Expand All @@ -98,8 +98,8 @@ func onReady() {
func onExit() {
}

func runPostwomanProxy() {
libproxy.Initialize("postwoman", "127.0.0.1:9159", "https://postwoman.io", "", onProxyStateChange, true, nil)
func runHoppscotchProxy() {
libproxy.Initialize("hoppscotch", "127.0.0.1:9159", "https://hoppscotch.io", "", onProxyStateChange, true, nil)
}

func onProxyStateChange(status string, isListening bool) {
Expand Down
2 changes: 1 addition & 1 deletion notifier/notifier_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ func Notify(appName, title, message, icon string) error {
notification.Title = appName
notification.Subtitle = title
notification.AppIcon = icon
notification.Sender = "io.postwoman.proxy"
notification.Sender = "io.hoppscotch.proxy"
_ = notification.Push()
return nil
}
3 changes: 1 addition & 2 deletions resources/darwin/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Proxywoman: Darwin Build
# Proxyscotch: Darwin Build

## resources/darwin

This directory acts as a skeleton, used to build an application container for Darwin.
The format for Darwin applications, is a directory with extension `.app`, containing a manifest and a `Contents/Resources` directory, as well as a `Contents/MacOS` directory containing a `Mach-O` executable.

This resources directory contains the application manifest (`Contents/Info.plist`) and the resources directory (`Contents/Resources`). The Mach-O executable and corresponding directory are then added to the skeleton when it is copied to the build directory.

2 changes: 1 addition & 1 deletion resources/linux/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Proxywoman: Linux Build
# Proxyscotch: Linux Build
2 changes: 1 addition & 1 deletion resources/windows/proxyscotch.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="$VERSION_NAME.0" processorArchitecture="*" name="Proxywoman" type="win32"/>
<assemblyIdentity version="$VERSION_NAME.0" processorArchitecture="*" name="Proxyscotch" type="win32"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
Expand Down

0 comments on commit 57c3eb1

Please sign in to comment.