MyProxy ·
MyProxy is an alternative to Nginx that allows automatic domain provider integration, ssl support for all domains, dynamic port proxy and automatic git deployment.
MyProxy helps you quickly and easily:
- 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
Watch the following videos to understand how MyProxy works:
Setting up MyProxy on your server
Try it out on one of our open source partners providing a heroku alternative: https://freedomains.dev/
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:
- Alberto Lopez - Available immediately
- David De Wulf - Open to new opportunities
- Rahul Kalra - Available immediately
- Sahil Kalra - UC San Diego senior, graduating June 2020
- Herman Wong - Open to new opportunities
To use MyProxy
, you need 3 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.
- Docker needs to be installed on the server. MyProxy uses Docker to run deployed apps inside containers.
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.
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 |
- 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
- Connect to your server:
ssh root@your-server-ip-address
- AWS Users Only Change to root user
sudo su root
and change to home foldercd ~
- Install Docker on your server, follow the instructions for your OS at the Docker docs.
- 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
andnpm
if system does not have them. - Enables firewall port
3000
(for the admin page UI),80
and443
. - 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
- 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!
- Go to your server URL:
- 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 the
scripts
section inpackage.json
with your app entry point command, understart
:"start": "node app.js"
- Run
git add .
- Run
git commit -m "Initial Commit"
- Run
git push origin master
Users can use Access Tokens to manage their domain mappings from a 3rd party server. See available endpoints
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
oryarn
- Run the app:
yarn start
ornpm run start
- You can also run the app under your own defined port by setting a
PORT
environment variable
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 toproviderList
, following the youracme.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
andsetRecord
. - 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 🍺
- Run
npm run autofix
: make sure there are no errors / warnings
MyProxy is MIT licensed
Thanks goes to these wonderful people (emoji key):
Song Zheng 💻 📖 🤔 🚇 🧑🏫 📆 👀 |
Herman Wong 💻 👀 |
rkalra247 💻 |
David De Wulf 💻 |
SahilKalra98 💻 |
albertoelopez 💻 |
Alberto Lopez 💻 |
Bryan Jennings 💻 |
Josh Greenwell 💻 |
Colton Ehrman 💻 👀 |
Guilherme Gwadera 💻 🚧 |
Cijin Cherian 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!