Giter VIP home page Giter VIP logo

warpgate's Introduction

Warpgate

Warpgate is an application that creates a Cloudflare WARP tunnel to toggle DNS settings for your network interface. This app is built using Electron and leverages sudo privileges to manage DNS configurations. The goal of this project is for demonstration purposes on how to securely protect the integrity of ElectronJS applications, specifically .ASAR files and how to correctly encrypt them if sensitive data related to HIPAA, PCI-DSS, PII, etc may be exposed.

Features

WarpGate

  • Toggle DNS settings between the system default and Cloudflare's 1.1.1.1 protocol.
  • Cross-platform support for Windows and macOS.

Installation

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)

Clone the Repository

git clone https://github.com/nullvaluez/warpgate.git
cd warpgate

Install Dependencies

npm install

Usage

Running the Application

To start the application, run the following command:

npm start

How It Works

1.) Preload Script (preload.js): Exposes a secure API to the renderer process for toggling DNS settings and receiving responses.

2.) Renderer Script (script.js): Listens for DOM content to load and sets up event listeners for the DNS toggle switch.

3.) Main Script (main.js): Creates the main application window and sets up IPC handlers to manage DNS settings using sudo commands.

4.) Pre-Pack Script (beforePack.js) Applies ASARMOR patch prior to output build. FILE MUST BE IN "DIST" FOLDER, AKA OUTPUT FOLDER FROM ELECTRON-BUILDER

5.) Post-Pack Script (afterPack.js) Encrypts the bundled .asar file after the build has been completed FILE MUST BE IN "DIST" FOLDER, AKA OUTPUT FOLDER FROM ELECTRON-BUILDER

Apply ASARMOR

To apply ASARMOR to the final distribution build, ensure afterPack.js and beforePack.js are located in /dist. If the dist folder has not yet been created, manually create the folder.

Package the Application

To package the application for distribution, use Electron Packager or Electron Builder. For example, using Electron Builder:

npm run dist

The application will now run the build process as well as apply protections to the .asar file.

License

This project is licensed under the MIT License - see the LICENSE file for details.

https://github.com/nullvaluez/warpgate.git

warpgate's People

Contributors

nullvaluez avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.