Compare commits

...

5 Commits

Author SHA1 Message Date
undergroundwires
9e722ddfb3 fixed script errors & added tests 2020-07-15 16:52:18 +01:00
undergroundwires-bot
646a8e0b9f ⬆️ bumped to 0.4.9 2020-07-14 21:38:19 +00:00
undergroundwires
f27a2871d7 simplified docker builds 2020-07-14 18:20:15 +01:00
undergroundwires
909c44d72a updated to may 2020 update 2020-07-14 18:20:15 +01:00
undergroundwires
53cf595e17 disable office telemetry Disassembler0/Win10-Initial-Setup-Script#288 2020-07-14 18:20:15 +01:00
9 changed files with 81 additions and 43 deletions

View File

@@ -1,5 +1,23 @@
# Changelog # Changelog
## 0.4.9 (2020-07-14)
* disable office telemetry Disassembler0/Win10-Initial-Setup-Script#288 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/53cf595e1726ee3de79137fd566978fd512d218f)
* updated to may 2020 update | [commit](https://github.com/undergroundwires/privacy.sexy/commit/909c44d72a4a602ee8f27d06b6ec706c1e432ce1)
* simplified docker builds | [commit](https://github.com/undergroundwires/privacy.sexy/commit/f27a2871d74e5117fc029be82caef12246e10879)
[compare](https://github.com/undergroundwires/privacy.sexy/compare/0.4.8...0.4.9)
## 0.4.8 (2020-07-11)
* added more scripts #16 (#17) | [commit](https://github.com/undergroundwires/privacy.sexy/commit/d8552c62ffea13ce62abce836c7dd4980eef6bb9)
* stopping services before disabling #16 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/628c16eb952495f5b3f6d794161b355f4b08b819)
* can disable features, capabilities & remove onedrive #16 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/30efbcc621eb83dd5a9c1e66b8f1f5350eb95006)
* updated one more typo (#19) | [commit](https://github.com/undergroundwires/privacy.sexy/commit/d7a1325c0b7665ce712dc411965d00fc1d6fa384)
* more tweaks #16 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/2c4eb78c3f156cb0d033977cffbe7464697680f5)
[compare](https://github.com/undergroundwires/privacy.sexy/compare/0.4.7...0.4.8)
## 0.4.7 (2020-06-30) ## 0.4.7 (2020-06-30)
* removed HKU tweak as all HKU's are changed #10 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/c937af8ee7da9aa95131e56abf7bf24800390fe6) * removed HKU tweak as all HKU's are changed #10 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/c937af8ee7da9aa95131e56abf7bf24800390fe6)

View File

@@ -1,20 +1,12 @@
# +-+-+-+-+-+ +-+-+-+-+-+ # Build
# |B|u|i|l|d| |S|t|a|g|e|
# +-+-+-+-+-+ +-+-+-+-+-+
FROM node:lts-alpine as build-stage FROM node:lts-alpine as build-stage
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install
COPY . . COPY . .
RUN npm run build RUN npm run build
# For testing purposes, it's easy to run http-server on lts-alpine such as continuing from here:
# RUN npm install -g http-server
# EXPOSE 8080
# CMD [ "http-server", "dist" ]
# +-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+ # Production stage
# |P|r|o|d|u|c|t|i|o|n| |S|t|a|g|e|
# +-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+
FROM nginx:stable-alpine as production-stage FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80 EXPOSE 80

View File

@@ -28,16 +28,16 @@ Fork it & add more scripts in [application.yaml](src/application/application.yam
## Commands ## Commands
- Setup and run - Project setup: `npm install`
- For development: - Testing
- `npm install` to project setup. - Run unit tests: `npm run test:unit`
- `npm run serve` to compile & hot-reload for development. - Lint: `npm run lint`
- Production (using Docker): - **Webpage**
- Build `docker build -t undergroundwires/privacy.sexy .` - Development: `npm run serve` to compile & hot-reload for development.
- Run `docker run -it -p 8080:8080 --rm --name privacy.sexy-1 undergroundwires/privacy.sexy` - Production: `npm run build` to prepare files for distribution.
- Prepare for production: `npm run build` - Or run using Docker:
- Run tests: `npm run test:unit` 1. Build: `docker build -t undergroundwires/privacy.sexy:0.4.9 .`
- Lint and fix files: `npm run lint` 2. Run: `docker run -it -p 8080:80 --rm --name privacy.sexy-0.4.9 undergroundwires/privacy.sexy:0.4.9`
## Architecture ## Architecture

View File

@@ -1,6 +1,6 @@
{ {
"name": "privacy.sexy", "name": "privacy.sexy",
"version": "0.4.7", "version": "0.4.9",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@@ -1,20 +1,20 @@
import { Category } from '../../domain/Category'; import { Category } from '../../domain/Category';
import { Application } from '../../domain/Application'; import { Application } from '../../domain/Application';
import applicationFile from 'js-yaml-loader!./../application.yaml'; import { ApplicationYaml } from 'js-yaml-loader!./../application.yaml';
import { parseCategory } from './CategoryParser'; import { parseCategory } from './CategoryParser';
export function parseApplication(): Application { export function parseApplication(content: ApplicationYaml): Application {
const categories = new Array<Category>(); const categories = new Array<Category>();
if (!applicationFile.actions || applicationFile.actions.length <= 0) { if (!content.actions || content.actions.length <= 0) {
throw new Error('Application does not define any action'); throw new Error('Application does not define any action');
} }
for (const action of applicationFile.actions) { for (const action of content.actions) {
const category = parseCategory(action); const category = parseCategory(action);
categories.push(category); categories.push(category);
} }
const app = new Application( const app = new Application(
applicationFile.name, content.name,
applicationFile.repositoryUrl, content.repositoryUrl,
process.env.VUE_APP_VERSION, process.env.VUE_APP_VERSION,
categories); categories);
return app; return app;

View File

@@ -3,13 +3,14 @@ import { IUserFilter } from './Filter/IUserFilter';
import { ApplicationCode } from './Code/ApplicationCode'; import { ApplicationCode } from './Code/ApplicationCode';
import { UserSelection } from './Selection/UserSelection'; import { UserSelection } from './Selection/UserSelection';
import { IUserSelection } from './Selection/IUserSelection'; import { IUserSelection } from './Selection/IUserSelection';
import { AsyncLazy } from '../../infrastructure/Threading/AsyncLazy'; import { AsyncLazy } from '@/infrastructure/Threading/AsyncLazy';
import { Signal } from '../../infrastructure/Events/Signal'; import { Signal } from '@/infrastructure/Events/Signal';
import { parseApplication } from '../Parser/ApplicationParser'; import { parseApplication } from '../Parser/ApplicationParser';
import { IApplicationState } from './IApplicationState'; import { IApplicationState } from './IApplicationState';
import { Script } from '../../domain/Script'; import { Script } from '@/domain/Script';
import { Application } from '../../domain/Application'; import { Application } from '@/domain/Application';
import { IApplicationCode } from './Code/IApplicationCode'; import { IApplicationCode } from './Code/IApplicationCode';
import applicationFile from 'js-yaml-loader!@/application/application.yaml';
/** Mutatable singleton application state that's the single source of truth throughout the application */ /** Mutatable singleton application state that's the single source of truth throughout the application */
export class ApplicationState implements IApplicationState { export class ApplicationState implements IApplicationState {
@@ -20,7 +21,7 @@ export class ApplicationState implements IApplicationState {
/** Application instance with all scripts. */ /** Application instance with all scripts. */
private static instance = new AsyncLazy<IApplicationState>(() => { private static instance = new AsyncLazy<IApplicationState>(() => {
const application = parseApplication(); const application = parseApplication(applicationFile);
const selectedScripts = new Array<Script>(); const selectedScripts = new Array<Script>();
const state = new ApplicationState(application, selectedScripts); const state = new ApplicationState(application, selectedScripts);
return Promise.resolve(state); return Promise.resolve(state);

View File

@@ -298,13 +298,17 @@ actions:
recommended: false recommended: false
docs: https://www.windowslifestyle.com/reset-data-usage-tool-reset-network-data-usage-windows-10/ docs: https://www.windowslifestyle.com/reset-data-usage-tool-reset-network-data-usage-windows-10/
code: |- code: |-
SET was_running=0 setlocal EnableDelayedExpansion
net stop DPS && was_running=1 SET /A dps_service_running=0
echo %was_running% SC queryex "DPS"|Find "STATE"|Find /v "RUNNING">Nul||(
del /F /S /Q /A "%windir%\System32\sru*" SET /A dps_service_running=1
IF NOT %was_running% == 0 ( net stop DPS
net start DPS )
) REM del /F /S /Q /A "%windir%\System32\sru*"
IF !dps_service_running! == 1 (
net start DPS
)
endlocal
- -
category: Disable OS data collection category: Disable OS data collection
@@ -373,6 +377,10 @@ actions:
code: |- code: |-
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" /v "PreventDeviceMetadataFromNetwork" /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" /v "PreventDeviceMetadataFromNetwork" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" /v "PreventDeviceMetadataFromNetwork" /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" /v "PreventDeviceMetadataFromNetwork" /t REG_DWORD /d 1 /f
-
name: Disable active prompting (pings to MSFT NCSI server)
recommend: false
code: reg add "HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet" /v "EnableActiveProbing" /t REG_DWORD /d "0" /f
- -
name: Opt out from Windows privacy consent name: Opt out from Windows privacy consent
recommend: true recommend: true
@@ -538,7 +546,6 @@ actions:
name: Deny app access to text/mms name: Deny app access to text/mms
recommend: true recommend: true
code: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /t REG_SZ /v "Value" /d DENY /f code: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /t REG_SZ /v "Value" /d DENY /f
- -
name: Deny location access name: Deny location access
recommend: true recommend: true
@@ -867,7 +874,11 @@ actions:
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\osm" /v "Enablelogging" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\osm" /v "Enablelogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\osm" /v "EnableUpload" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\15.0\osm" /v "EnableUpload" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "Enablelogging" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "Enablelogging" /t REG_DWORD /d 0 /f
reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "EnableUpload" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "EnableUpload" /t REG_DWORD /d 0 /f
schtasks /change /TN "Microsoft\Office\Office ClickToRun Service Monitor" /DISABLE
schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack2016" /DISABLE
schtasks /change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn2016" /DISABLE
sc stop "ClickToRunSvc" & sc config "ClickToRunSvc" start= disabled
- -
category: Configure browsers category: Configure browsers
children: children:
@@ -1130,7 +1141,11 @@ actions:
- -
name: Disable Windows Defender name: Disable Windows Defender
recommend: false recommend: false
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f code: |-
netsh advfirewall set allprofiles state off
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\MpsSvc" /v "Start" /t REG_DWORD /d 4 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\WinDefend" /v "Start" /t REG_DWORD /d 4 /f
- -
name: Disable Smart Screen name: Disable Smart Screen
recommend: false recommend: false

View File

@@ -17,7 +17,7 @@ declare module 'js-yaml-loader!*' {
category: string; category: string;
} }
interface ApplicationYaml { export interface ApplicationYaml {
name: string; name: string;
repositoryUrl: string; repositoryUrl: string;
actions: ReadonlyArray<YamlCategory>; actions: ReadonlyArray<YamlCategory>;

View File

@@ -0,0 +1,12 @@
import applicationFile from 'js-yaml-loader!@/application/application.yaml';
import { parseApplication } from '@/application/Parser/ApplicationParser';
import 'mocha';
import { expect } from 'chai';
describe('ApplicationParser', () => {
describe('parseApplication', () => {
it('can parse current application file', () => {
expect(() => parseApplication(applicationFile)).to.not.throw();
});
});
});