MyProxy ·

MyProxy is an application that helps you quickly and easily:

Helps you connect to your Domain provider

Set up A and CNAME records for your selected domains

Create and serve SSL certificates for your selected domains

Run an unlimited number of applications on your subdomains

To understand what MyProxy does for you, the video below walks you through how to create and deploy a new application as well as an existing application:

If you want to install MyProxy into your own server, setup instructions are simple. Install MyProxy into your server and then connect the your domain name.

Why?

Setting up a server is hard - especially setting up DNS records, managing certificates, and deployment. So we setup to build a simple and easy-to-use app that helps us build applications quickly.

We are new to software engineering so if you find areas where this app could be improved, please let us know by creating an issue. We are excited to learn!

Also, we are currently seeking jobs. If your team needs software engineers, please reach out:

Prerequisites

To use MyProxy , you need 2 things:

A domain name. MyProxy uses acme.sh, so you would have to buy the domains from any of the DNS APIs listed there (includes all of the major providers like namecheap, goDaddy, etc.) A server’s IP address that you have root access to. You can use your home server or get one from AWS EC2, DigitalOcean, GoogleCloud, etc.

Installation and Usage

Server setup

We tested MyProxy on the AWS and Google Cloud platforms. If you use them, please follow the configurations and setup below to make sure MyProxy works well for you.

AWS Setup

You will need to configure the VM’s firewall per table below during security group setup on AWS EC2 instance.

Type Protocol Port Range Source HTTP TCP 80 0.0.0.0/0 HTTPS TCP 443 0.0.0.0/0 SSH TCP 22 0.0.0.0/0 Custom TCP Rule TCP 3000 0.0.0.0/0 Custom TCP Rule TCP 9418 0.0.0.0/0

Google Cloud Setup

Target: specify target tags

Target Tags: myproxy

Source Filter: IP ranges

Source IP: 0.0.0.0/0

Specify Protocol and Ports: tcp: 3000

Update Google VMs to specify myproxy http-server https-server in network tags

Installation

Connect to your server: ssh root@your-server-ip-address AWS Users Only Change to root user sudo su root and change to home folder cd ~ Clone the app: git clone https://github.com/garageScript/myProxy.git Go to the MyProxy folder: cd myProxy Run the setup script ./scripts/setup.sh Installs nodeJS and npm if system does not have them.

and if system does not have them. Enables firewall port 3000 (for the admin page UI), 80 and 443 .

(for the admin page UI), and . Installs application dependencies

For a complete list of commands the script runs, look here Run the App: ADMIN=YOUR_ADMIN_PASSWORD npm run server You can also run the app under your own defined port by setting a PORT environment variable Exit from server exit

Usage

Go to your server url: http://your-server-ip-address:3000 . You will be prompted to enter your admin password and your domain provider’s API Key and Secret, find out how here All your domain names in that provider will show up. Click the setup button next to the domain you wish to setup (could take up to 5 minutes) After your domain is setup, you will be able to generate as many subdomain repositories as you want! To do that: Go to your server URL: http://your-server-ip-address:3000 Create a subdomain. IP and port are optional. You should see a git link that was created for you. git clone the app, then build the app locally. Find out how in the Building Your Local App section below. When you are done, git push origin master and watch your app run in production!

Building-Your-Local-App

In the terminal, run git clone <your fullDomain repo> to clone your app folder. Enter your repo cd <your fullDomain folder> Run npm init -y Run npm i express --save Run touch app.js Copy the following code into app.js.

const express = require ( ' express ' ); const app = express (); app . use ( express . static ( ' public ' )); app . get ( ' / ' , ( req , res ) => { res . send ( ' hello ' ); }); app . listen ( process . env . PORT || 8123 );

Update scripts section of package.json with "start:myproxy": "node app.js" Run git add . Run git commit -m "Initial Commit" Run git push origin master

API Reference

Users can use Access Tokens to manage their domain mappings from a 3rd party server. See available endpoints

Development & Contribution

The following steps will guide you through how to setup your development environment to send pull requests or build your own custom features.

You need to install node and typescript

Fork and clone the repository. Install dependencies: npm install or yarn Run the app: yarn start or npm run start You can also run the app under your own defined port by setting a PORT environment variable

Adding a new provider

If your company sells domain names and you want your service to be supported on MyProxy, make sure you integrate with acme.sh first.

Sample integration for Name.com that you can follow along.

All implemented providers are listed in src/providers/index.ts . Add your service to providerList , following the your acme.sh integration’s naming convention. path should be the location of the file you create in the next step. Create a file that exports the following functions: getDomains and setRecord . Depending on your API in the previous step, you may need to create types. Types should be added to src/types/general.ts

You are done! Get a beer 🍺

Before sending a Pull Request:

Run npm run autofix : make sure there are no errors / warnings

License

MyProxy is MIT licensed