Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9d7f62d81 | ||
|
|
11e0613165 | ||
|
|
77c3d2bbb8 | ||
|
|
784a67afff | ||
|
|
19a092dd31 | ||
|
|
4c2f74949b | ||
|
|
a3fc3782ef | ||
|
|
cdc93f032a |
5
.github/workflows/test.yaml
vendored
5
.github/workflows/test.yaml
vendored
@@ -4,7 +4,10 @@ on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos, ubuntu, windows]
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## 0.7.5 (2020-09-14)
|
||||
|
||||
* fix reverting (reinstalling) capabilities not working | [commit](https://github.com/undergroundwires/privacy.sexy/commit/939d838e3535bb1c9b00c8ea9dacb735ae41d700)
|
||||
* fix tests and checks are not running on PRs | [commit](https://github.com/undergroundwires/privacy.sexy/commit/82d509129b4e4a5df4b84786a0d6842a7d26e888)
|
||||
* fix the recycling bin option (#32) | [commit](https://github.com/undergroundwires/privacy.sexy/commit/15db3118012a172a2191a2afad57084a65b34642)
|
||||
* fix rendering issue in older edge/IE | [commit](https://github.com/undergroundwires/privacy.sexy/commit/6efed72bf25c2ddf0901caab7f22966ca13cd47a)
|
||||
* fix pasting in search bar after page load showing no results | [commit](https://github.com/undergroundwires/privacy.sexy/commit/d1694341578288eeaf8b80caf9296a38d76789f0)
|
||||
* fix typo | [commit](https://github.com/undergroundwires/privacy.sexy/commit/7dd15ed06433e0e6583ab0fa46a683ce6554bbea)
|
||||
|
||||
[compare](https://github.com/undergroundwires/privacy.sexy/compare/0.7.4...0.7.5)
|
||||
|
||||
## 0.7.4 (2020-09-12)
|
||||
|
||||
* fix checked checkbox has blue border | [commit](https://github.com/undergroundwires/privacy.sexy/commit/4ae385b7fcea9014a68442714b7d99e2ee7df7d0)
|
||||
|
||||
19
README.md
19
README.md
@@ -15,21 +15,20 @@
|
||||
## Get started
|
||||
|
||||
- Online version: [https://privacy.sexy](https://privacy.sexy)
|
||||
- or download latest desktop version for [Windows](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.4/privacy.sexy-Setup-0.7.4.exe), [Linux](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.4/privacy.sexy-0.7.4.AppImage), [macOS](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.4/privacy.sexy-0.7.4.dmg)
|
||||
- or download latest desktop version for [Windows](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.5/privacy.sexy-Setup-0.7.5.exe), [Linux](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.5/privacy.sexy-0.7.5.AppImage), [macOS](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.5/privacy.sexy-0.7.5.dmg)
|
||||
- 💡 Come back regularly to apply latest version for stronger privacy and security.
|
||||
|
||||
[](https://privacy.sexy)
|
||||
|
||||
## Why
|
||||
|
||||
- You don't need to run any compiled software that has access to your system, just run the generated scripts.
|
||||
- Have full visibility into what the tweaks do as you enable them.
|
||||
- Ability to revert applied scripts
|
||||
- Rich tweak pool to harden security & privacy of the OS and other software on it
|
||||
- Free (both free as in beer and free as in speech)
|
||||
- No need to run any compiled software that has access to your system, just run the generated scripts
|
||||
- Have full visibility into what the tweaks do as you enable them
|
||||
- Ability to revert (undo) applied scripts
|
||||
- Easily extendable
|
||||
- Everything is open-sourced including both application and infrastructure
|
||||
- Fully automated CI/CD pipeline using GitHub actions
|
||||
- to AWS for provisioning serverless infrastructure
|
||||
- for building and sharing the desktop applications
|
||||
- Everything is open-source and automated (both application and its infrastructure)
|
||||
|
||||
## Extend scripts
|
||||
|
||||
@@ -49,8 +48,8 @@
|
||||
- Development: `npm run serve` to compile & hot-reload for development.
|
||||
- Production: `npm run build` to prepare files for distribution.
|
||||
- Or run using Docker:
|
||||
1. Build: `docker build -t undergroundwires/privacy.sexy:0.7.4 .`
|
||||
2. Run: `docker run -it -p 8080:80 --rm --name privacy.sexy-0.7.4 undergroundwires/privacy.sexy:0.7.4`
|
||||
1. Build: `docker build -t undergroundwires/privacy.sexy:0.7.5 .`
|
||||
2. Run: `docker run -it -p 8080:80 --rm --name privacy.sexy-0.7.5 undergroundwires/privacy.sexy:0.7.5`
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
1453
package-lock.json
generated
1453
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
49
package.json
49
package.json
@@ -1,9 +1,14 @@
|
||||
{
|
||||
"name": "privacy.sexy",
|
||||
"version": "0.7.4",
|
||||
"version": "0.7.5",
|
||||
"author": "undergroundwires",
|
||||
"description": "Enforce privacy & security best-practices on Windows, because privacy is sexy 🍑🍆",
|
||||
"homepage": "https://privacy.sexy",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/undergroundwires/privacy.sexy.git"
|
||||
},
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
@@ -21,44 +26,44 @@
|
||||
},
|
||||
"main": "background.js",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.30",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.14.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^5.14.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.14.0",
|
||||
"@fortawesome/vue-fontawesome": "^0.1.10",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.15.1",
|
||||
"@fortawesome/free-regular-svg-icons": "^5.15.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
||||
"@fortawesome/vue-fontawesome": "^2.0.0",
|
||||
"ace-builds": "^1.4.12",
|
||||
"file-saver": "^2.0.2",
|
||||
"inversify": "^5.0.1",
|
||||
"liquor-tree": "^0.2.70",
|
||||
"v-tooltip": "2.0.2",
|
||||
"vue": "^2.6.12",
|
||||
"vue-class-component": "^7.2.5",
|
||||
"vue-class-component": "^7.2.6",
|
||||
"vue-js-modal": "^2.0.0-rc.6",
|
||||
"vue-property-decorator": "^9.0.0"
|
||||
"vue-property-decorator": "^9.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ace": "0.0.43",
|
||||
"@types/chai": "^4.2.12",
|
||||
"@types/ace": "0.0.44",
|
||||
"@types/chai": "^4.2.14",
|
||||
"@types/file-saver": "^2.0.1",
|
||||
"@types/mocha": "^8.0.3",
|
||||
"@vue/cli-plugin-typescript": "^4.5.4",
|
||||
"@vue/cli-plugin-unit-mocha": "^4.5.4",
|
||||
"@vue/cli-service": "^4.5.4",
|
||||
"@vue/test-utils": "1.0.4",
|
||||
"@vue/cli-plugin-typescript": "^4.5.7",
|
||||
"@vue/cli-plugin-unit-mocha": "^4.5.7",
|
||||
"@vue/cli-service": "^4.5.7",
|
||||
"@vue/test-utils": "1.1.0",
|
||||
"chai": "^4.2.0",
|
||||
"electron": "^10.1.0",
|
||||
"electron": "^10.1.3",
|
||||
"electron-devtools-installer": "^3.1.1",
|
||||
"electron-log": "^4.2.4",
|
||||
"electron-updater": "^4.3.4",
|
||||
"electron-updater": "^4.3.5",
|
||||
"js-yaml-loader": "^1.2.2",
|
||||
"markdownlint-cli": "^0.23.2",
|
||||
"remark-cli": "^8.0.1",
|
||||
"markdownlint-cli": "^0.24.0",
|
||||
"remark-cli": "^9.0.0",
|
||||
"remark-lint-no-dead-urls": "^1.1.0",
|
||||
"remark-preset-lint-consistent": "^3.0.1",
|
||||
"remark-preset-lint-consistent": "^4.0.0",
|
||||
"remark-validate-links": "^10.0.2",
|
||||
"sass": "^1.26.10",
|
||||
"sass-loader": "^10.0.1",
|
||||
"typescript": "^4.0.2",
|
||||
"sass": "^1.27.0",
|
||||
"sass-loader": "^10.0.3",
|
||||
"typescript": "^4.0.3",
|
||||
"vue-cli-plugin-electron-builder": "^2.0.0-rc.4",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"yaml-lint": "^1.2.4"
|
||||
|
||||
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OperatingSystem } from '../OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
import { DetectorBuilder } from './DetectorBuilder';
|
||||
import { IBrowserOsDetector } from './IBrowserOsDetector';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IBrowserOsDetector } from './IBrowserOsDetector';
|
||||
import { OperatingSystem } from '../OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
export class DetectorBuilder {
|
||||
private readonly existingPartsInUserAgent = new Array<string>();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OperatingSystem } from '../OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
export interface IBrowserOsDetector {
|
||||
detect(userAgent: string): OperatingSystem;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { BrowserOsDetector } from './BrowserOs/BrowserOsDetector';
|
||||
import { IBrowserOsDetector } from './BrowserOs/IBrowserOsDetector';
|
||||
import { IEnvironment } from './IEnvironment';
|
||||
import { OperatingSystem } from './OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
interface IEnvironmentVariables {
|
||||
readonly window: Window & typeof globalThis;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OperatingSystem } from './OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
export interface IEnvironment {
|
||||
isDesktop: boolean;
|
||||
|
||||
@@ -1,24 +1,35 @@
|
||||
import { Category } from '@/domain/Category';
|
||||
import { Application } from '@/domain/Application';
|
||||
import { IApplication } from '@/domain/IApplication';
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
import { ApplicationYaml } from 'js-yaml-loader!./../application.yaml';
|
||||
import { parseCategory } from './CategoryParser';
|
||||
import { ProjectInformation } from '../../domain/ProjectInformation';
|
||||
|
||||
export function parseApplication(content: ApplicationYaml): IApplication {
|
||||
|
||||
export function parseApplication(content: ApplicationYaml, env: NodeJS.ProcessEnv = process.env): IApplication {
|
||||
validate(content);
|
||||
const categories = new Array<Category>();
|
||||
for (const action of content.actions) {
|
||||
const category = parseCategory(action);
|
||||
categories.push(category);
|
||||
}
|
||||
const info = readAppInformation(env);
|
||||
const app = new Application(
|
||||
content.name,
|
||||
content.repositoryUrl,
|
||||
process.env.VUE_APP_VERSION,
|
||||
info,
|
||||
categories);
|
||||
return app;
|
||||
}
|
||||
|
||||
function readAppInformation(environment): IProjectInformation {
|
||||
return new ProjectInformation(
|
||||
environment.VUE_APP_NAME,
|
||||
environment.VUE_APP_VERSION,
|
||||
environment.VUE_APP_REPOSITORY_URL,
|
||||
environment.VUE_APP_HOMEPAGE_URL,
|
||||
);
|
||||
}
|
||||
|
||||
function validate(content: ApplicationYaml): void {
|
||||
if (!content) {
|
||||
throw new Error('application is null or undefined');
|
||||
|
||||
@@ -39,7 +39,7 @@ export class ApplicationState implements IApplicationState {
|
||||
/** Initially selected scripts */
|
||||
public readonly defaultScripts: Script[]) {
|
||||
this.selection = new UserSelection(app, defaultScripts.map((script) => new SelectedScript(script, false)));
|
||||
this.code = new ApplicationCode(this.selection, app.version);
|
||||
this.code = new ApplicationCode(this.selection, app.info.version);
|
||||
this.filter = new UserFilter(app);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# Structure documented in "./application.yaml.d.ts" (as code)
|
||||
name: privacy.sexy
|
||||
repositoryUrl: https://github.com/undergroundwires/privacy.sexy
|
||||
actions:
|
||||
-
|
||||
category: Privacy cleanup
|
||||
@@ -376,9 +374,8 @@ actions:
|
||||
del "%TEMP%\List.txt" /s /f /q
|
||||
del "%TEMP%\tokensonly.txt" /s /f /q
|
||||
-
|
||||
# If somebody is on LTSC 2019 then DefaultUser0 Account is by default created on Installation as telemetry account.
|
||||
# Hence it must be removed . if by default this account is not found on other builds of win10 then it will not affect any functionality of OS & will ignore it
|
||||
name: Delete default0 ghost telemetry user
|
||||
name: Delete controversial default0 user
|
||||
docs: https://github.com/undergroundwires/privacy.sexy/issues/30
|
||||
recommend: true
|
||||
code: net user defaultuser0 /delete 2>nul
|
||||
-
|
||||
@@ -429,10 +426,10 @@ actions:
|
||||
children:
|
||||
-
|
||||
name: Disable Customer Experience Improvement (CEIP/SQM)
|
||||
docs: https://docs.microsoft.com/en-us/windows/win32/devnotes/ceipenable
|
||||
recommend: true
|
||||
code: reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "0" /f
|
||||
revertCode: reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "1" /f
|
||||
docs: https://docs.microsoft.com/en-us/windows/win32/devnotes/ceipenable
|
||||
-
|
||||
name: Disable Application Impact Telemetry (AIT)
|
||||
recommend: true
|
||||
@@ -463,8 +460,8 @@ actions:
|
||||
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /ENABLE
|
||||
-
|
||||
name: Disable Webcam Telemetry (devicecensus.exe)
|
||||
recommend: true
|
||||
docs: https://www.ghacks.net/2019/09/23/what-is-devicecensus-exe-on-windows-10-and-why-does-it-need-internet-connectivity/
|
||||
recommend: true
|
||||
code: schtasks /change /TN "Microsoft\Windows\Device Information\Device" /DISABLE
|
||||
revertCode: schtasks /change /TN "Microsoft\Windows\Device Information\Device" /ENABLE
|
||||
-
|
||||
@@ -475,12 +472,13 @@ actions:
|
||||
schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
|
||||
schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /DISABLE
|
||||
schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /DISABLE
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe" /v Debugger /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe" /v "Debugger" /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
|
||||
revertCode: |-
|
||||
schtasks /change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /ENABLE
|
||||
schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /ENABLE
|
||||
schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /ENABLE
|
||||
schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /ENABLE
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe" /v "Debugger" /f
|
||||
-
|
||||
name: Disable telemetry in data collection policy
|
||||
recommend: true
|
||||
@@ -1149,17 +1147,40 @@ actions:
|
||||
recommend: true
|
||||
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableActivityFeed" /d "0" /t REG_DWORD /f
|
||||
-
|
||||
name: Disable Windows Insider Program
|
||||
recommend: true
|
||||
code: |-
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /t "REG_DWORD" /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /v "HideInsiderPage" /t "REG_DWORD" /d "1" /f
|
||||
sc stop "wisvc" & sc config "wisvc" start=disabled
|
||||
category: Disable Windows Insider Program
|
||||
children:
|
||||
-
|
||||
name: Disable Windows Insider Service
|
||||
docs: http://revertservice.com/10/wisvc/
|
||||
recommend: true
|
||||
code: sc stop "wisvc" & sc config "wisvc" start=disabled
|
||||
revertCode: sc config "wisvc" start=demand
|
||||
-
|
||||
name: Do not let Microsoft try features on this build
|
||||
docs: https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.DataCollection::EnableExperimentation
|
||||
recommend: true
|
||||
code: |-
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /t "REG_DWORD" /d 0 /f
|
||||
revertCode: |-
|
||||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /f
|
||||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /f
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /f
|
||||
-
|
||||
name: Disable getting preview builds of Windows
|
||||
docs: https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.AllowBuildPreview::AllowBuildPreview
|
||||
recommend: true
|
||||
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f
|
||||
revertCode: reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /f
|
||||
-
|
||||
name: Remove "Windows Insider Program" from Settings
|
||||
docs: https://www.askvg.com/windows-10-tip-remove-windows-insider-program-section-from-settings-page/
|
||||
code: reg add "HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /v "HideInsiderPage" /t "REG_DWORD" /d "1" /f
|
||||
revertCode: reg delete "HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /v "HideInsiderPage" /f
|
||||
-
|
||||
category: Disable cloud sync
|
||||
docs: https://support.microsoft.com/en-us/help/4026102/windows-10-about-sync-settings
|
||||
children:
|
||||
-
|
||||
name: Disable all settings sync
|
||||
@@ -1222,7 +1243,9 @@ actions:
|
||||
-
|
||||
name: Disable Language Setting Sync
|
||||
recommend: true
|
||||
code: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v Enabled /d 0 /f
|
||||
docs: https://www.tenforums.com/tutorials/4077-turn-off-sync-settings-microsoft-account-windows-10-a.html
|
||||
code: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v "Enabled" /d 0 /f
|
||||
revertCode: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v "Enabled" /d 1 /f
|
||||
-
|
||||
category: Configure programs
|
||||
children:
|
||||
@@ -1266,21 +1289,24 @@ actions:
|
||||
-
|
||||
name: Disable visual studio telemetry
|
||||
recommend: true
|
||||
code: reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v TurnOffSwitch /t REG_DWORD /d 1 /f
|
||||
code: reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v "TurnOffSwitch" /t REG_DWORD /d 1 /f
|
||||
revertCode: reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v "TurnOffSwitch" /t REG_DWORD /d 0 /f
|
||||
-
|
||||
name: Disable Visual Studio feedback
|
||||
recommend: true
|
||||
code: |-
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableFeedbackDialog /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableEmailInput /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableScreenshotCapture /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableFeedbackDialog" /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableEmailInput" /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableScreenshotCapture" /t REG_DWORD /d 1 /f
|
||||
revertCode: |-
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableFeedbackDialog" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableEmailInput" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableScreenshotCapture" /t REG_DWORD /d 0 /f
|
||||
-
|
||||
name: Stop and disable Visual Studio Standard Collector Service
|
||||
recommend: true
|
||||
code: |-
|
||||
sc stop "VSStandardCollectorService150"
|
||||
net stop VSStandardCollectorService150 2>nul
|
||||
sc config "VSStandardCollectorService150" start=disabled
|
||||
code: sc stop "VSStandardCollectorService150" & sc config "VSStandardCollectorService150" start=disabled
|
||||
revertCode: sc config "VSStandardCollectorService150" start=auto & sc start "VSStandardCollectorService150"
|
||||
-
|
||||
category: Configure Windows Defender
|
||||
children:
|
||||
@@ -1515,7 +1541,7 @@ actions:
|
||||
# sc stop "ClickToRunSvc" & sc config "ClickToRunSvc" start=disabled
|
||||
# revertCode: |-
|
||||
# schtasks /change /TN "Microsoft\Office\Office ClickToRun Service Monitor" /ENABLE
|
||||
# sc config "ClickToRunSvc" start=auto
|
||||
# sc config "ClickToRunSvc" start=auto & sc start "ClickToRunSvc"
|
||||
-
|
||||
name: Disable Subscription Heartbeat
|
||||
recommend: false
|
||||
@@ -1641,9 +1667,9 @@ actions:
|
||||
-
|
||||
name: Disable Chrome metrics reporting
|
||||
recommend: true
|
||||
code: |-
|
||||
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
|
||||
reg add "HKCU\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
|
||||
docs: https://www.stigviewer.com/stig/google_chrome_v23_windows/2013-01-11/finding/V-35780
|
||||
code: reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
|
||||
revertCode: reg delete "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /f
|
||||
-
|
||||
category: Configure Mozilla Firefox telemetry
|
||||
children:
|
||||
@@ -1677,27 +1703,38 @@ actions:
|
||||
code: |-
|
||||
sc stop "gupdate" & sc config "gupdate" start=disabled
|
||||
sc stop "gupdatem" & sc config "gupdatem" start=disabled
|
||||
schtasks /Change /DISABLE /TN "GoogleUpdateTaskMachineCore"
|
||||
schtasks /Change /DISABLE /TN "GoogleUpdateTaskMachineUA"
|
||||
schtasks /change /disable /tn "GoogleUpdateTaskMachineCore"
|
||||
schtasks /change /disable /tn "GoogleUpdateTaskMachineUA"
|
||||
revertCode: |-
|
||||
sc config "gupdate" start=auto & sc start "gupdate"
|
||||
sc config "gupdatem" start=auto & sc start "gupdatem"
|
||||
schtasks /Change /enable /tn "GoogleUpdateTaskMachineCore"
|
||||
schtasks /change /enable /tn "GoogleUpdateTaskMachineUA"
|
||||
-
|
||||
name: Disable Adobe Acrobat update service
|
||||
recommend: true
|
||||
code: |-
|
||||
sc stop "AdobeARMservice" & sc config AdobeARMservice start=disabled
|
||||
sc stop "adobeupdateservice" & sc config adobeupdateservice start=disabled
|
||||
sc stop "adobeflashplayerupdatesvc" & sc config adobeflashplayerupdatesvc start=disabled
|
||||
sc stop "AdobeARMservice" & sc config "AdobeARMservice" start=disabled
|
||||
sc stop "adobeupdateservice" & sc config "adobeupdateservice" start=disabled
|
||||
sc stop "adobeflashplayerupdatesvc" & sc config "adobeflashplayerupdatesvc" start=disabled
|
||||
schtasks /change /tn "Adobe Acrobat Update Task" /disable
|
||||
schtasks /change /tn "Adobe Flash Player Updater" /disable
|
||||
revertCode: |-
|
||||
sc config "AdobeARMservice" start=auto & sc start "AdobeARMservice"
|
||||
sc config "adobeupdateservice" start=auto & sc start "adobeupdateservice"
|
||||
sc config "adobeflashplayerupdatesvc" start=auto & sc start "adobeflashplayerupdatesvc"
|
||||
schtasks /change /tn "Adobe Acrobat Update Task" /enable
|
||||
schtasks /change /tn "Adobe Flash Player Updater" /enable
|
||||
-
|
||||
name: Disable Razer Game Scanner Service
|
||||
recommend: true
|
||||
code: |-
|
||||
sc stop "Razer Game Scanner Service" & sc config "Razer Game Scanner Service" start=disabled
|
||||
code: sc stop "Razer Game Scanner Service" & sc config "Razer Game Scanner Service" start=disabled
|
||||
revertCode: sc config "Razer Game Scanner Service" start=demand
|
||||
-
|
||||
name: Disable Logitech Gaming Registry Service
|
||||
recommend: true
|
||||
code: |-
|
||||
sc stop "LogiRegistryService" & sc config "LogiRegistryService" start=disabled
|
||||
code: sc stop "LogiRegistryService" & sc config "LogiRegistryService" start=disabled
|
||||
revertCode: sc config "LogiRegistryService" start=auto & sc start "LogiRegistryService"
|
||||
-
|
||||
name: Disable Dropbox auto update service
|
||||
recommend: true
|
||||
@@ -1706,6 +1743,11 @@ actions:
|
||||
sc stop "dbupdatem" & sc config "dbupdatem" start=disabled
|
||||
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineCore"
|
||||
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineUA"
|
||||
revertCode: |-
|
||||
sc config "dbupdate" start=auto & sc start "dbupdate"
|
||||
sc config "dbupdatem" start=auto & sc start "dbupdatem"
|
||||
schtasks /Change /ENABLE /TN "DropboxUpdateTaskMachineCore"
|
||||
schtasks /Change /ENABLE /TN "DropboxUpdateTaskMachineUA"
|
||||
-
|
||||
category: Disable Media Player data collection
|
||||
children:
|
||||
@@ -2075,7 +2117,7 @@ actions:
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AUOptions" /t "REG_DWORD" /d "3" /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallDay" /t "REG_DWORD" /d "0" /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallTime" /t "REG_DWORD" /d "0" /f
|
||||
sc config "UsoSvc" start=auto
|
||||
sc config "UsoSvc" start=auto & sc start "UsoSvc"
|
||||
-
|
||||
category: UI for privacy
|
||||
children:
|
||||
@@ -2251,47 +2293,56 @@ actions:
|
||||
name: Delivery Optimization (P2P Windows Updates)
|
||||
recommend: true
|
||||
code: sc stop "DoSvc" & sc config "DoSvc" start=disabled
|
||||
revertCode: sc config "DoSvc" start=auto & sc start "DoSvc"
|
||||
-
|
||||
name: Microsoft Windows Live ID Service
|
||||
recommend: true
|
||||
code: sc stop "wlidsvc" & sc config "wlidsvc" start=demand
|
||||
revertCode: sc config "wlidsvc" start=demand
|
||||
-
|
||||
name: Program Compatibility Assistant Service
|
||||
recommend: true
|
||||
code: sc stop "PcaSvc" & sc config "PcaSvc" start=disabled
|
||||
revertCode: sc config "PcaSvc" start=demand
|
||||
-
|
||||
name: Downloaded Maps Manager
|
||||
recommend: true
|
||||
code: sc stop "MapsBroker" & sc config "MapsBroker" start=disabled
|
||||
revertCode: sc config "MapsBroker" start=auto & sc start "MapsBroker"
|
||||
-
|
||||
name: Microsoft Retail Demo experience
|
||||
recommend: true
|
||||
code: sc stop "RetailDemo" & sc config "RetailDemo" start=disabled
|
||||
revertCode: sc config "RetailDemo" start=demand
|
||||
-
|
||||
name: Mail, contact, calendar and user data synchronization.
|
||||
recommend: false
|
||||
code: |-
|
||||
sc stop "OneSyncSvc" & sc config "OneSyncSvc" start=disabled
|
||||
sc stop "UnistoreSvc" & sc config "UnistoreSvc" start=disabled
|
||||
reg add HKLM\SYSTEM\CurrentControlSet\Services\OneSyncSvc /V Start /t REG_DWORD /d "0x4" /f
|
||||
category: Mail, contact, calendar and user data synchronization
|
||||
children:
|
||||
-
|
||||
name: User Data Storage (UnistoreSvc) Service
|
||||
code: sc stop "UnistoreSvc" & sc config "UnistoreSvc" start=disabled
|
||||
revertCode: sc config "UnistoreSvc" start=demand
|
||||
-
|
||||
name: Sync Host (OneSyncSvc) Service Service
|
||||
code: sc stop "OneSyncSvc" & sc config "OneSyncSvc" start=disabled
|
||||
revertCode: sc config "OneSyncSvc" start=auto & sc start "OneSyncSvc"
|
||||
-
|
||||
name: Contact data indexing
|
||||
recommend: false
|
||||
code: |-
|
||||
sc stop "PimIndexMaintenanceSvc" & sc config "PimIndexMaintenanceSvc" start=disabled
|
||||
code: sc stop "PimIndexMaintenanceSvc" & sc config "PimIndexMaintenanceSvc" start=disabled
|
||||
revertCode: sc config "PimIndexMaintenanceSvc" start=demand
|
||||
-
|
||||
name: App user data access
|
||||
recommend: false
|
||||
code: sc stop "UserDataSvc" & sc config "UserDataSvc" start=disabled
|
||||
revertCode: sc config "UserDataSvc" start=demand
|
||||
-
|
||||
name: Text messaging
|
||||
recommend: false
|
||||
code: sc stop "MessagingService" & sc config "MessagingService" start=disabled
|
||||
revertCode: sc config "MessagingService" start=demand
|
||||
-
|
||||
name: Windows Push Notification Service
|
||||
recommend: true
|
||||
docs: https://en.wikipedia.org/wiki/Windows_Push_Notification_Service#Privacy_Issue
|
||||
code: sc stop "WpnService" & sc config "WpnService" start=disabled
|
||||
revertCode: sc config "WpnService" start=auto & sc start "WpnService"
|
||||
-
|
||||
category: Disable Xbox services
|
||||
children:
|
||||
@@ -2299,7 +2350,7 @@ actions:
|
||||
name: Xbox Live Auth Manager
|
||||
recommend: true
|
||||
code: sc stop "XblAuthManager" & sc config "XblAuthManager" start=disabled
|
||||
revetCode: sc config "XblAuthManager" start=demand
|
||||
revertCode: sc config "XblAuthManager" start=demand
|
||||
-
|
||||
name: Xbox Live Game Save
|
||||
recommend: true
|
||||
@@ -2309,13 +2360,13 @@ actions:
|
||||
name: Xbox Live Networking Service
|
||||
recommend: true
|
||||
code: sc stop "XboxNetApiSvc" & sc config "XboxNetApiSvc" start=disabled
|
||||
revetCode: sc config "XboxNetApiSvc" start=demand
|
||||
revertCode: sc config "XboxNetApiSvc" start=demand
|
||||
-
|
||||
name: Volume Shadow Copy Service
|
||||
recommend: true
|
||||
docs: https://docs.microsoft.com/en-us/windows-server/storage/file-server/volume-shadow-copy-service
|
||||
code: sc stop "VSS" & sc config "VSS" start=disabled
|
||||
revertCode: sc config "vss" start=auto
|
||||
revertCode: sc config "VSS" start=demand
|
||||
-
|
||||
category: Remove bloatware
|
||||
children:
|
||||
@@ -2924,9 +2975,9 @@ actions:
|
||||
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
|
||||
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
|
||||
revertCode: |-
|
||||
revertCode: dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x64" /NoRestart
|
||||
revertCode: dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
|
||||
revertCode: dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
|
||||
dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x64" /NoRestart
|
||||
dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
|
||||
dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
|
||||
recommend: false
|
||||
-
|
||||
name: Legacy Components feature
|
||||
|
||||
2
src/application/application.yaml.d.ts
vendored
2
src/application/application.yaml.d.ts
vendored
@@ -19,8 +19,6 @@ declare module 'js-yaml-loader!*' {
|
||||
}
|
||||
|
||||
export interface ApplicationYaml {
|
||||
name: string;
|
||||
repositoryUrl: string;
|
||||
actions: ReadonlyArray<YamlCategory>;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { IEntity } from '../infrastructure/Entity/IEntity';
|
||||
import { ICategory } from './ICategory';
|
||||
import { IScript } from './IScript';
|
||||
import { IApplication } from './IApplication';
|
||||
import { IProjectInformation } from './IProjectInformation';
|
||||
|
||||
export class Application implements IApplication {
|
||||
public get totalScripts(): number { return this.flattened.allScripts.length; }
|
||||
@@ -10,13 +11,11 @@ export class Application implements IApplication {
|
||||
private readonly flattened: IFlattenedApplication;
|
||||
|
||||
constructor(
|
||||
public readonly name: string,
|
||||
public readonly repositoryUrl: string,
|
||||
public readonly version: string,
|
||||
public readonly info: IProjectInformation,
|
||||
public readonly actions: ReadonlyArray<ICategory>) {
|
||||
if (!name) { throw Error('Application has no name'); }
|
||||
if (!repositoryUrl) { throw Error('Application has no repository url'); }
|
||||
if (!version) { throw Error('Version cannot be empty'); }
|
||||
if (!info) {
|
||||
throw new Error('info is undefined');
|
||||
}
|
||||
this.flattened = flatten(actions);
|
||||
ensureValid(this.flattened);
|
||||
ensureNoDuplicates(this.flattened.allCategories);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { IScript } from '@/domain/IScript';
|
||||
import { ICategory } from '@/domain/ICategory';
|
||||
import { IProjectInformation } from './IProjectInformation';
|
||||
|
||||
export interface IApplication {
|
||||
readonly name: string;
|
||||
readonly repositoryUrl: string;
|
||||
readonly version: string;
|
||||
readonly info: IProjectInformation;
|
||||
readonly totalScripts: number;
|
||||
readonly totalCategories: number;
|
||||
readonly actions: ReadonlyArray<ICategory>;
|
||||
|
||||
11
src/domain/IProjectInformation.ts
Normal file
11
src/domain/IProjectInformation.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { OperatingSystem } from './OperatingSystem';
|
||||
export interface IProjectInformation {
|
||||
readonly name: string;
|
||||
readonly version: string;
|
||||
readonly repositoryUrl: string;
|
||||
readonly homepage: string;
|
||||
readonly feedbackUrl: string;
|
||||
readonly releaseUrl: string;
|
||||
readonly repositoryWebUrl: string;
|
||||
getDownloadUrl(os: OperatingSystem): string;
|
||||
}
|
||||
55
src/domain/ProjectInformation.ts
Normal file
55
src/domain/ProjectInformation.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { IProjectInformation } from './IProjectInformation';
|
||||
import { OperatingSystem } from './OperatingSystem';
|
||||
|
||||
export class ProjectInformation implements IProjectInformation {
|
||||
public readonly repositoryWebUrl: string;
|
||||
constructor(
|
||||
public readonly name: string,
|
||||
public readonly version: string,
|
||||
public readonly repositoryUrl: string,
|
||||
public readonly homepage: string,
|
||||
) {
|
||||
if (!name) {
|
||||
throw new Error('name is undefined');
|
||||
}
|
||||
if (!version || +version <= 0) {
|
||||
throw new Error('version should be higher than zero');
|
||||
}
|
||||
if (!repositoryUrl) {
|
||||
throw new Error('repositoryUrl is undefined');
|
||||
}
|
||||
if (!homepage) {
|
||||
throw new Error('homepage is undefined');
|
||||
}
|
||||
this.repositoryWebUrl = getWebUrl(this.repositoryUrl);
|
||||
}
|
||||
public getDownloadUrl(os: OperatingSystem): string {
|
||||
return `${this.repositoryWebUrl}/releases/download/${this.version}/${getFileName(os, this.version)}`;
|
||||
}
|
||||
public get feedbackUrl(): string {
|
||||
return `${this.repositoryWebUrl}/issues`;
|
||||
}
|
||||
public get releaseUrl(): string {
|
||||
return `${this.repositoryWebUrl}/releases/tag/${this.version}`;
|
||||
}
|
||||
}
|
||||
|
||||
function getWebUrl(gitUrl: string) {
|
||||
if (gitUrl.endsWith('.git')) {
|
||||
return gitUrl.substring(0, gitUrl.length - 4);
|
||||
}
|
||||
return gitUrl;
|
||||
}
|
||||
|
||||
function getFileName(os: OperatingSystem, version: string): string {
|
||||
switch (os) {
|
||||
case OperatingSystem.Linux:
|
||||
return `privacy.sexy-${version}.AppImage`;
|
||||
case OperatingSystem.macOS:
|
||||
return `privacy.sexy-${version}.dmg`;
|
||||
case OperatingSystem.Windows:
|
||||
return `privacy.sexy-Setup-${version}.exe`;
|
||||
default:
|
||||
throw new Error(`Unsupported os: ${OperatingSystem[os]}`);
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
public async mounted() {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
this.repositoryUrl = state.app.repositoryUrl;
|
||||
this.repositoryUrl = state.app.info.repositoryWebUrl;
|
||||
state.filter.filterRemoved.on(() => {
|
||||
this.isSearching = false;
|
||||
});
|
||||
|
||||
@@ -22,10 +22,10 @@ const NothingChosenCode =
|
||||
.appendCommentLine(' 📙 Come back regularly to apply latest version for stronger privacy and security.')
|
||||
.appendLine()
|
||||
.appendCommentLine('-- 🧐 Why privacy.sexy')
|
||||
.appendCommentLine(' ✔️ Rich tweak pool to harden security & privacy of the OS and other softwares on it.')
|
||||
.appendCommentLine(' ✔️ You don\'t need to run any compiled software on your system, just run the generated scripts.')
|
||||
.appendCommentLine(' ✔️ Rich tweak pool to harden security & privacy of the OS and other software on it.')
|
||||
.appendCommentLine(' ✔️ No need to run any compiled software on your system, just run the generated scripts.')
|
||||
.appendCommentLine(' ✔️ Have full visibility into what the tweaks do as you enable them.')
|
||||
.appendCommentLine(' ✔️ Free software, 100% transparency: both application & infrastructure code are open-sourced.')
|
||||
.appendCommentLine(' ✔️ Open-source and free (both free as in beer and free as in speech).')
|
||||
.toString();
|
||||
|
||||
@Component
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { Environment } from '@/application/Environment/Environment';
|
||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
import DownloadUrlListItem from './DownloadUrlListItem.vue';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator';
|
||||
import { StatefulVue } from '@/presentation/StatefulVue';
|
||||
import { Environment } from '@/application/Environment/Environment';
|
||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
@Component
|
||||
export default class DownloadUrlListItem extends StatefulVue {
|
||||
@@ -39,7 +39,7 @@ export default class DownloadUrlListItem extends StatefulVue {
|
||||
|
||||
private async getDownloadUrlAsync(os: OperatingSystem): Promise<string> {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
return `${state.app.repositoryUrl}/releases/download/${state.app.version}/${getFileName(os, state.app.version)}`;
|
||||
return state.app.info.getDownloadUrl(os);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,18 +62,6 @@ function getOperatingSystemName(os: OperatingSystem): string {
|
||||
}
|
||||
}
|
||||
|
||||
function getFileName(os: OperatingSystem, version: string): string {
|
||||
switch (os) {
|
||||
case OperatingSystem.Linux:
|
||||
return `privacy.sexy-${version}.AppImage`;
|
||||
case OperatingSystem.macOS:
|
||||
return `privacy.sexy-${version}.dmg`;
|
||||
case OperatingSystem.Windows:
|
||||
return `privacy.sexy-Setup-${version}.exe`;
|
||||
default:
|
||||
throw new Error(`Unsupported os: ${OperatingSystem[os]}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -48,8 +48,8 @@ export default class TheFooter extends StatefulVue {
|
||||
|
||||
public async mounted() {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
this.repositoryUrl = state.app.repositoryUrl;
|
||||
this.feedbackUrl = `${state.app.repositoryUrl}/issues`;
|
||||
this.repositoryUrl = state.app.info.repositoryWebUrl;
|
||||
this.feedbackUrl = state.app.info.feedbackUrl;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="footer__section">
|
||||
<span v-if="isDesktop" class="footer__section__item">
|
||||
<font-awesome-icon class="icon" :icon="['fas', 'globe']" />
|
||||
<span>Online version at <a href="https://privacy.sexy" target="_blank">https://privacy.sexy</a></span>
|
||||
<span>Online version at <a :href="homepageUrl" target="_blank">{{ homepageUrl }}</a></span>
|
||||
</span>
|
||||
<span v-else class="footer__section__item">
|
||||
<DownloadUrlList />
|
||||
@@ -66,6 +66,7 @@ export default class TheFooter extends StatefulVue {
|
||||
public repositoryUrl: string = '';
|
||||
public releaseUrl: string = '';
|
||||
public feedbackUrl: string = '';
|
||||
public homepageUrl: string = '';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -74,12 +75,15 @@ export default class TheFooter extends StatefulVue {
|
||||
|
||||
public async mounted() {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
this.version = state.app.version;
|
||||
this.repositoryUrl = state.app.repositoryUrl;
|
||||
this.releaseUrl = `${state.app.repositoryUrl}/releases/tag/${state.app.version}`;
|
||||
this.feedbackUrl = `${state.app.repositoryUrl}/issues`;
|
||||
const info = state.app.info;
|
||||
this.version = info.version;
|
||||
this.homepageUrl = info.homepage;
|
||||
this.repositoryUrl = info.repositoryWebUrl;
|
||||
this.releaseUrl = info.releaseUrl;
|
||||
this.feedbackUrl = info.feedbackUrl;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -16,7 +16,7 @@ export default class TheHeader extends StatefulVue {
|
||||
|
||||
public async mounted() {
|
||||
const state = await this.getCurrentStateAsync();
|
||||
this.title = state.app.name;
|
||||
this.title = state.app.info.name;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { expect } from 'chai';
|
||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
import { BrowserOsDetector } from '@/application/Environment/BrowserOs/BrowserOsDetector';
|
||||
import { BrowserOsTestCases } from './BrowserOsTestCases';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
interface IBrowserOsTestCase {
|
||||
userAgent: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
interface IDesktopTestCase {
|
||||
processPlatform: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IBrowserOsDetector } from '@/application/Environment/BrowserOs/IBrowserOsDetector';
|
||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
import { DesktopOsTestCases } from './DesktopOsTestCases';
|
||||
import { Environment } from '@/application/Environment/Environment';
|
||||
import { expect } from 'chai';
|
||||
|
||||
@@ -5,8 +5,6 @@ import 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import { parseCategory } from '@/application/Parser/CategoryParser';
|
||||
|
||||
declare var process;
|
||||
|
||||
describe('ApplicationParser', () => {
|
||||
describe('parseApplication', () => {
|
||||
it('can parse current application file', () => {
|
||||
@@ -16,74 +14,64 @@ describe('ApplicationParser', () => {
|
||||
expect(() => parseApplication(undefined)).to.throw('application is null or undefined');
|
||||
});
|
||||
it('throws when undefined actions', () => {
|
||||
const sut: ApplicationYaml = {
|
||||
name: 'test',
|
||||
repositoryUrl: 'https://privacy.sexy',
|
||||
actions: undefined,
|
||||
};
|
||||
const sut: ApplicationYaml = { actions: undefined };
|
||||
expect(() => parseApplication(sut)).to.throw('application does not define any action');
|
||||
});
|
||||
it('throws when has no actions', () => {
|
||||
const sut: ApplicationYaml = {
|
||||
name: 'test',
|
||||
repositoryUrl: 'https://privacy.sexy',
|
||||
actions: [],
|
||||
};
|
||||
const sut: ApplicationYaml = { actions: [] };
|
||||
expect(() => parseApplication(sut)).to.throw('application does not define any action');
|
||||
});
|
||||
it('returns expected name', () => {
|
||||
// arrange
|
||||
const expected = 'test-app-name';
|
||||
const sut: ApplicationYaml = {
|
||||
name: expected,
|
||||
repositoryUrl: 'https://privacy.sexy',
|
||||
actions: [ getTestCategory() ],
|
||||
};
|
||||
// act
|
||||
const actual = parseApplication(sut).name;
|
||||
// assert
|
||||
expect(actual).to.be.equal(actual);
|
||||
});
|
||||
it('returns expected repository url', () => {
|
||||
// arrange
|
||||
const expected = 'https://privacy.sexy';
|
||||
const sut: ApplicationYaml = {
|
||||
name: 'name',
|
||||
repositoryUrl: expected,
|
||||
actions: [ getTestCategory() ],
|
||||
};
|
||||
// act
|
||||
const actual = parseApplication(sut).repositoryUrl;
|
||||
// assert
|
||||
expect(actual).to.be.equal(actual);
|
||||
});
|
||||
it('returns expected repository version', () => {
|
||||
// arrange
|
||||
const expected = '1.0.0';
|
||||
process = {
|
||||
env: {
|
||||
VUE_APP_VERSION: expected,
|
||||
},
|
||||
};
|
||||
const sut: ApplicationYaml = {
|
||||
name: 'name',
|
||||
repositoryUrl: 'https://privacy.sexy',
|
||||
actions: [ getTestCategory() ],
|
||||
};
|
||||
// act
|
||||
const actual = parseApplication(sut).version;
|
||||
// assert
|
||||
expect(actual).to.be.equal(actual);
|
||||
describe('information', () => {
|
||||
it('returns expected repository version', () => {
|
||||
// arrange
|
||||
const expected = 'expected-version';
|
||||
const env = getProcessEnvironmentStub();
|
||||
env.VUE_APP_VERSION = expected;
|
||||
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||
// act
|
||||
const actual = parseApplication(sut, env).info.version;
|
||||
// assert
|
||||
expect(actual).to.be.equal(expected);
|
||||
});
|
||||
it('returns expected repository url', () => {
|
||||
// arrange
|
||||
const expected = 'https://expected-repository.url';
|
||||
const env = getProcessEnvironmentStub();
|
||||
env.VUE_APP_REPOSITORY_URL = expected;
|
||||
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||
// act
|
||||
const actual = parseApplication(sut, env).info.repositoryUrl;
|
||||
// assert
|
||||
expect(actual).to.be.equal(expected);
|
||||
});
|
||||
it('returns expected name', () => {
|
||||
// arrange
|
||||
const expected = 'expected-app-name';
|
||||
const env = getProcessEnvironmentStub();
|
||||
env.VUE_APP_NAME = expected;
|
||||
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||
// act
|
||||
const actual = parseApplication(sut, env).info.name;
|
||||
// assert
|
||||
expect(actual).to.be.equal(expected);
|
||||
});
|
||||
it('returns expected homepage url', () => {
|
||||
// arrange
|
||||
const expected = 'https://expected.sexy';
|
||||
const env = getProcessEnvironmentStub();
|
||||
env.VUE_APP_HOMEPAGE_URL = expected;
|
||||
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||
// act
|
||||
const actual = parseApplication(sut, env).info.homepage;
|
||||
// assert
|
||||
expect(actual).to.be.equal(expected);
|
||||
});
|
||||
});
|
||||
it('parses actions', () => {
|
||||
// arrange
|
||||
const actions = [ getTestCategory('test1'), getTestCategory('test2') ];
|
||||
const expected = [ parseCategory(actions[0]), parseCategory(actions[1]) ];
|
||||
const sut: ApplicationYaml = {
|
||||
name: 'name',
|
||||
repositoryUrl: 'https://privacy.sexy',
|
||||
actions,
|
||||
};
|
||||
const sut: ApplicationYaml = { actions };
|
||||
// act
|
||||
const actual = parseApplication(sut).actions;
|
||||
// assert
|
||||
@@ -113,3 +101,12 @@ function getTestScript(scriptName: string): YamlScript {
|
||||
recommend: true,
|
||||
};
|
||||
}
|
||||
|
||||
function getProcessEnvironmentStub(): NodeJS.ProcessEnv {
|
||||
return {
|
||||
VUE_APP_VERSION: 'stub-version',
|
||||
VUE_APP_NAME: 'stub-name',
|
||||
VUE_APP_REPOSITORY_URL: 'stub-repository-url',
|
||||
VUE_APP_HOMEPAGE_URL: 'stub-homepage-url',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { ScriptStub } from './../stubs/ScriptStub';
|
||||
import { CategoryStub } from './../stubs/CategoryStub';
|
||||
import { Application } from './../../../src/domain/Application';
|
||||
import { Application } from '@/domain/Application';
|
||||
import 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import { ProjectInformation } from '@/domain/ProjectInformation';
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
|
||||
describe('Application', () => {
|
||||
it('getRecommendedScripts returns as expected', () => {
|
||||
@@ -11,53 +13,56 @@ describe('Application', () => {
|
||||
new ScriptStub('S3').withIsRecommended(true),
|
||||
new ScriptStub('S4').withIsRecommended(true),
|
||||
];
|
||||
const sut = new Application('name', 'repo', '0.1.0', [
|
||||
const sut = new Application(createInformation(), [
|
||||
new CategoryStub(3).withScripts(expected[0], new ScriptStub('S1').withIsRecommended(false)),
|
||||
new CategoryStub(2).withScripts(expected[1], new ScriptStub('S2').withIsRecommended(false)),
|
||||
]);
|
||||
|
||||
// act
|
||||
const actual = sut.getRecommendedScripts();
|
||||
|
||||
// assert
|
||||
expect(expected[0]).to.deep.equal(actual[0]);
|
||||
expect(expected[1]).to.deep.equal(actual[1]);
|
||||
});
|
||||
it('cannot construct without categories', () => {
|
||||
// arrange
|
||||
const categories = [];
|
||||
|
||||
// act
|
||||
function construct() { return new Application('name', 'repo', '0.1.0', categories); }
|
||||
|
||||
// assert
|
||||
expect(construct).to.throw('Application must consist of at least one category');
|
||||
});
|
||||
it('cannot construct without scripts', () => {
|
||||
// arrange
|
||||
const categories = [
|
||||
new CategoryStub(3),
|
||||
new CategoryStub(2),
|
||||
];
|
||||
|
||||
// act
|
||||
function construct() { return new Application('name', 'repo', '0.1.0', categories); }
|
||||
|
||||
// assert
|
||||
expect(construct).to.throw('Application must consist of at least one script');
|
||||
});
|
||||
it('cannot construct without any recommended scripts', () => {
|
||||
// arrange
|
||||
const categories = [
|
||||
new CategoryStub(3).withScripts(new ScriptStub('S1').withIsRecommended(false)),
|
||||
new CategoryStub(2).withScripts(new ScriptStub('S2').withIsRecommended(false)),
|
||||
];
|
||||
|
||||
// act
|
||||
function construct() { return new Application('name', 'repo', '0.1.0', categories); }
|
||||
|
||||
// assert
|
||||
expect(construct).to.throw('Application must consist of at least one recommended script');
|
||||
describe('parameter validation', () => {
|
||||
it('cannot construct without categories', () => {
|
||||
// arrange
|
||||
const categories = [];
|
||||
// act
|
||||
function construct() { return new Application(createInformation(), categories); }
|
||||
// assert
|
||||
expect(construct).to.throw('Application must consist of at least one category');
|
||||
});
|
||||
it('cannot construct without scripts', () => {
|
||||
// arrange
|
||||
const categories = [
|
||||
new CategoryStub(3),
|
||||
new CategoryStub(2),
|
||||
];
|
||||
// act
|
||||
function construct() { return new Application(createInformation(), categories); }
|
||||
// assert
|
||||
expect(construct).to.throw('Application must consist of at least one script');
|
||||
});
|
||||
it('cannot construct without any recommended scripts', () => {
|
||||
// arrange
|
||||
const categories = [
|
||||
new CategoryStub(3).withScripts(new ScriptStub('S1').withIsRecommended(false)),
|
||||
new CategoryStub(2).withScripts(new ScriptStub('S2').withIsRecommended(false)),
|
||||
];
|
||||
// act
|
||||
function construct() { return new Application(createInformation(), categories); }
|
||||
// assert
|
||||
expect(construct).to.throw('Application must consist of at least one recommended script');
|
||||
});
|
||||
it('cannot construct without information', () => {
|
||||
// arrange
|
||||
const categories = [new CategoryStub(1).withScripts(new ScriptStub('S1').withIsRecommended(true))];
|
||||
const information = undefined;
|
||||
// act
|
||||
function construct() { return new Application(information, categories); }
|
||||
// assert
|
||||
expect(construct).to.throw('info is undefined');
|
||||
});
|
||||
});
|
||||
it('totalScripts counts right', () => {
|
||||
// arrange
|
||||
@@ -67,9 +72,9 @@ describe('Application', () => {
|
||||
new CategoryStub(3).withCategories(new CategoryStub(4).withScripts(new ScriptStub('S4'))),
|
||||
];
|
||||
// act
|
||||
const application = new Application('name', 'repo', '0.1.0', categories);
|
||||
const sut = new Application(createInformation(), categories);
|
||||
// assert
|
||||
expect(application.totalScripts).to.equal(4);
|
||||
expect(sut.totalScripts).to.equal(4);
|
||||
});
|
||||
it('totalCategories counts right', () => {
|
||||
// arrange
|
||||
@@ -79,8 +84,22 @@ describe('Application', () => {
|
||||
new CategoryStub(3).withCategories(new CategoryStub(4).withScripts(new ScriptStub('S4'))),
|
||||
];
|
||||
// act
|
||||
const application = new Application('name', 'repo', '0.1.0', categories);
|
||||
const sut = new Application(createInformation(), categories);
|
||||
// assert
|
||||
expect(application.totalCategories).to.equal(4);
|
||||
expect(sut.totalCategories).to.equal(4);
|
||||
});
|
||||
it('sets information as expected', () => {
|
||||
// arrange
|
||||
const expected = createInformation();
|
||||
// act
|
||||
const sut = new Application(
|
||||
expected,
|
||||
[new CategoryStub(1).withScripts(new ScriptStub('S1').withIsRecommended(true))]);
|
||||
// assert
|
||||
expect(sut.info).to.deep.equal(expected);
|
||||
});
|
||||
});
|
||||
|
||||
function createInformation(): IProjectInformation {
|
||||
return new ProjectInformation('name', 'repo', '0.1.0', 'homepage');
|
||||
}
|
||||
|
||||
128
tests/unit/domain/ProjectInformation.spec.ts
Normal file
128
tests/unit/domain/ProjectInformation.spec.ts
Normal file
@@ -0,0 +1,128 @@
|
||||
import 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import { ProjectInformation } from '@/domain/ProjectInformation';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
|
||||
describe('ProjectInformation', () => {
|
||||
it('sets name as expected', () => {
|
||||
// arrange
|
||||
const expected = 'expected-name';
|
||||
const sut = new ProjectInformation(expected, 'version', 'repositoryUrl', 'homepage');
|
||||
// act
|
||||
const actual = sut.name;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('sets version as expected', () => {
|
||||
// arrange
|
||||
const expected = 'expected-version';
|
||||
const sut = new ProjectInformation('name', expected, 'repositoryUrl', 'homepage');
|
||||
// act
|
||||
const actual = sut.version;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('sets repositoryUrl as expected', () => {
|
||||
// arrange
|
||||
const expected = 'expected-repository-url';
|
||||
const sut = new ProjectInformation('name', 'version', expected, 'homepage');
|
||||
// act
|
||||
const actual = sut.repositoryUrl;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
describe('sets repositoryWebUrl as expected', () => {
|
||||
it('sets repositoryUrl when it does not end with .git', () => {
|
||||
// arrange
|
||||
const expected = 'expected-repository-url';
|
||||
const sut = new ProjectInformation('name', 'version', expected, 'homepage');
|
||||
// act
|
||||
const actual = sut.repositoryWebUrl;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('removes ".git" from the end when it ends with ".git"', () => {
|
||||
// arrange
|
||||
const expected = 'expected-repository-url';
|
||||
const sut = new ProjectInformation('name', 'version', `${expected}.git`, 'homepage');
|
||||
// act
|
||||
const actual = sut.repositoryWebUrl;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
});
|
||||
it('sets homepage as expected', () => {
|
||||
// arrange
|
||||
const expected = 'expected-homepage';
|
||||
const sut = new ProjectInformation('name', 'version', 'repositoryUrl', expected);
|
||||
// act
|
||||
const actual = sut.homepage;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('sets feedbackUrl to github issues page', () => {
|
||||
// arrange
|
||||
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||
const expected = 'https://github.com/undergroundwires/privacy.sexy/issues';
|
||||
const sut = new ProjectInformation('name', 'version', repositoryUrl, 'homepage');
|
||||
// act
|
||||
const actual = sut.feedbackUrl;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('sets releaseUrl to github releases page', () => {
|
||||
// arrange
|
||||
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||
const version = '0.7.2';
|
||||
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/tag/0.7.2';
|
||||
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||
// act
|
||||
const actual = sut.releaseUrl;
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
describe('getDownloadUrl', () => {
|
||||
it('gets expected url for macOS', () => {
|
||||
// arrange
|
||||
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-0.7.2.dmg';
|
||||
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||
const version = '0.7.2';
|
||||
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||
// act
|
||||
const actual = sut.getDownloadUrl(OperatingSystem.macOS);
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('gets expected url for Linux', () => {
|
||||
// arrange
|
||||
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-0.7.2.AppImage';
|
||||
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||
const version = '0.7.2';
|
||||
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||
// act
|
||||
const actual = sut.getDownloadUrl(OperatingSystem.Linux);
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('gets expected url for Windows', () => {
|
||||
// arrange
|
||||
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-Setup-0.7.2.exe';
|
||||
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||
const version = '0.7.2';
|
||||
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||
// act
|
||||
const actual = sut.getDownloadUrl(OperatingSystem.Windows);
|
||||
// assert
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
it('throws when OS is unknown', () => {
|
||||
// arrange
|
||||
const sut = new ProjectInformation('name', 'version', 'repositoryUrl', 'homepage');
|
||||
const os = OperatingSystem.Unknown;
|
||||
// act
|
||||
const act = () => sut.getDownloadUrl(os);
|
||||
// assert
|
||||
expect(act).to.throw(`Unsupported os: ${OperatingSystem[os]}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,11 +1,10 @@
|
||||
import { IApplication, ICategory, IScript } from '@/domain/IApplication';
|
||||
import { ProjectInformation } from '@/domain/ProjectInformation';
|
||||
|
||||
export class ApplicationStub implements IApplication {
|
||||
public totalScripts = 0;
|
||||
public totalCategories = 0;
|
||||
public readonly name = 'StubApplication';
|
||||
public readonly repositoryUrl = 'https://privacy.sexy';
|
||||
public readonly version = '0.1.0';
|
||||
public readonly info = new ProjectInformation('StubApplication', '0.1.0', 'https://github.com/undergroundwires/privacy.sexy', 'https://privacy.sexy');
|
||||
public readonly actions = new Array<ICategory>();
|
||||
|
||||
public withAction(category: ICategory): ApplicationStub {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
process.env.VUE_APP_VERSION = require('./package.json').version;
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
process.env.VUE_APP_VERSION = packageJson.version;
|
||||
process.env.VUE_APP_NAME = packageJson.name;
|
||||
process.env.VUE_APP_REPOSITORY_URL = packageJson.repository.url;
|
||||
process.env.VUE_APP_HOMEPAGE_URL = packageJson.homepage;
|
||||
|
||||
module.exports = {
|
||||
pluginOptions: {
|
||||
|
||||
Reference in New Issue
Block a user