Skip to content

Commit

Permalink
New alghoritm to defend, lot of small issues fixed, probably fixed he…
Browse files Browse the repository at this point in the history
…ap memory (opengs#127)

* Fix opengs#54: Show version in title bar (opengs#71)

Co-authored-by: Dawn <[email protected]>

* i18n: [es ua en] + ui fixes (opengs#82)

* - i18n: es, ua, en
- improved language select
- improved advanced settings popup
- atack -> attack

* Check for updates every hour

* Fix typo in Ukrainian instruction (opengs#84)

Fix typo in Ukrainian instruction

* Update pwd-docker-compose.yml

* Added one space in current target place:for bett UI/UX (opengs#89)

* add referer (opengs#97)

* tag version build also

* Added new translations (LT, CS, DE, NL, SK) (opengs#107)

* Add Lithuanian translations

* Add Czech translations

* Add German translations

* Add Dutch translations

* Add Slovak translations

* Add new translations to dropdown

* Add additional space to currentTarget

Co-authored-by: Adam Raźniewski <[email protected]>

* Prioritizing target

* auto prioritizing update

* removed console log

* Axios update

* Prioritized workers

* Prepare to 0.0.12

* fix dockerfile (opengs#124)

* Removed frozen lockfile

Co-authored-by: Furiosae <[email protected]>
Co-authored-by: Dawn <[email protected]>
Co-authored-by: Mykhailo Lytvyn <[email protected]>
Co-authored-by: Dmytro Litvinov <[email protected]>
Co-authored-by: Andrii-L-DDoSer <[email protected]>
Co-authored-by: forzaukraine <[email protected]>
Co-authored-by: Julius <[email protected]>
  • Loading branch information
8 people authored Mar 6, 2022
1 parent e34ef2d commit 06ab338
Show file tree
Hide file tree
Showing 28 changed files with 560 additions and 171 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/github-actions-docker-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: dockerci

on:
push:
tags:
- '*'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: opengs
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v2
- name: Extract tag name
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
id: extract_tag
- name: Extract tag name without v
shell: bash
run: echo "##[set-output name=tagv;]$(echo ${GITHUB_REF#refs/tags/v})"
id: extract_tag_v
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: true
tags: |
ghcr.io/opengs/uashield:${{ steps.extract_tag.outputs.tag }}
ghcr.io/opengs/uashield:${{ steps.extract_tag.outputs.tagv }}
5 changes: 4 additions & 1 deletion .github/workflows/github-actions-docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: dockerci

on: [push]
on:
push:
branches:
- '*'

jobs:
docker:
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM node:16.9.0-alpine AS builder
WORKDIR /code

COPY yarn.lock .
COPY yarn.lock ./yarn.lock
COPY packageheadless.json ./package.json
RUN yarn --frozen-lockfile
# no need to --frozen-lockfile
# from docs - If yarn.lock is present and is enough to satisfy all the dependencies listed in package.json,
# the exact versions recorded in yarn.lock are installed, and yarn.lock will be unchanged.
# Yarn will not check for newer versions.
RUN yarn install

COPY . .
COPY tsconfig.headless.json ./tsconfig.json

RUN yarn build:headless

FROM node:14-alpine
FROM node:16.9.0-alpine

WORKDIR /code

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
2. Вибираємо [найновший реліз](https://github.com/opengs/uashield/releases/latest) і свою платформу
3. Скачуємо і запускаємо

**В користувачів на Linux можливо треба буде додати аргумент `--no-sandbox`. Windows повинен працювати без всяких додаткових речей**
**У користувачів на Linux можливо треба буде додати аргумент `--no-sandbox`. Windows повинен працювати без всяких додаткових речей**

## Як це працює

Expand Down
6 changes: 1 addition & 5 deletions headless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ const doser = new Doser(useProxy, workers, false);

doser.listen('atack', (data: any) => console.log(data.log))

doser.loadHostsFile().then(() => {
doser.start()
}).catch(() => {
process.exit(1);
})
doser.start()
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shield",
"version": "0.0.11",
"version": "0.0.12",
"description": "Cyber security shield",
"productName": "UA Cyber SHIELD",
"author": "Mykola Zhyhallo <[email protected]>",
Expand All @@ -19,7 +19,7 @@
"@quasar/extras": "^1.0.0",
"@types/node-fetch": "^2.6.1",
"@types/superagent": "^4.1.15",
"axios": "^0.21.1",
"axios": "^0.26.0",
"axios-https-proxy-fix": "^0.17.1",
"core-js": "^3.6.5",
"electron-updater": "^4.6.5",
Expand All @@ -39,12 +39,12 @@
"@quasar/app": "^3.0.0",
"@types/node": "^12.20.21",
"@types/user-agents": "^1.0.2",
"esbuild": "0.14.23",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"electron": "^17.1.0",
"electron-builder": "22.14.13",
"electron-packager": "^15.4.0",
"esbuild": "0.14.23",
"eslint": "^7.14.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.19.1",
Expand Down
2 changes: 1 addition & 1 deletion pwd-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
restart: always
environment:
WORKERS: '512'
USEPROXY: 'true'
USEPROXY: 'false'
deploy:
replicas: 6

5 changes: 5 additions & 0 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { configure } = require('quasar/wrappers')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
const { version } = require('./package.json')

module.exports = configure(function (ctx) {
return {
Expand Down Expand Up @@ -138,6 +139,10 @@ module.exports = configure(function (ctx) {
]
},

htmlVariables: {
version
},

// https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
Expand Down
21 changes: 14 additions & 7 deletions src-electron/electron-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ function createWindow () {
doser.listen('atack', (data) => console.log(data.log))
doser.listen('atack', (data) => window.webContents.send('atack', data))
doser.listen('error', (data) => window.webContents.send('error', data))
doser.loadHostsFile().then(() => {
doser.start()
}).catch(() => {
app.quit()
})

doser.start()

ipcMain.on('updateDDOSEnable', (event, arg) => {
if (arg.newVal) {
doser.start()
Expand Down Expand Up @@ -122,8 +118,19 @@ autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {

app.whenReady().then(createWindow)

function checkUpdates() {
try {
autoUpdater.checkForUpdates()
} catch(err) {
console.log(err, "Error while checking update")
}
}

app.on('ready', function() {
autoUpdater.checkForUpdates();
checkUpdates()
setInterval(() => {
checkUpdates()
}, 1000 * 60 * 60)
});

app.on('window-all-closed', () => {
Expand Down
Loading

0 comments on commit 06ab338

Please sign in to comment.