1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 01:57:32 +08:00

35 Commits

Author SHA1 Message Date
Jonathan Leibiusky @xetorthio
24f8c9fc62 Change import statements accordingly 2017-05-08 15:35:42 -03:00
Michael Irwin
38c97cf100
Added API endpoint to get available instance images 2017-04-11 16:57:29 -04:00
Marcos Lilljedahl
75f3c93612 Add TCP proxy for tcp over http connections 2017-03-30 16:49:03 -03:00
Marcos Lilljedahl
712f019ffb Resolve localhost 2017-03-15 18:16:36 -03:00
Jonathan Leibiusky @xetorthio
5f647d7fba Make PWD dns recursive 2017-02-24 11:52:42 -03:00
Jonathan Leibiusky @xetorthio
b6e44d93bc Also listen our dns server on tcp, so when we fail on udp and client retries on tcp, we also fail fast. 2017-02-24 10:54:15 -03:00
Jonathan Leibiusky @xetorthio
b44fb3d7bd Instead of returning a nice error, just close the connection as it seems
libnetwork doesn't handle RcodeServerFailure, and when receiving it it
won't try the next configured DNSs
2017-02-24 09:55:08 -03:00
Marcos Lilljedahl
d1772aebe9 Add cors only to routes that need it 2017-02-20 14:24:53 -03:00
Marcos Lilljedahl
0df09bebdb Allow to send subdomains but forward header as is to backends 2017-02-17 13:58:53 -03:00
Marcos Lilljedahl
9e57f3b61c Allow to override target host header using subdomains 2017-02-17 12:53:16 -03:00
Jonathan Leibiusky
f816be6f69 Add DNS support for PWD instances (#94)
* Add DNS support for PWD instances

* Store IP address of PWD in all session networks and restore it with the
same IP address

* Remove unnecesary print

* Change url format to pwd<ip>-port for better DNS filtering

* Make PWD listen on 80 and 443 for DNS resolve to work
2017-02-17 11:10:01 -03:00
Jonathan Leibiusky @xetorthio
9c4df837a8 Add support for websocket proxying 2017-02-14 15:41:03 -03:00
Marcos Nils
640d64c3aa Update proxy to handle port redirects (#92) 2017-02-12 02:25:25 +02:00
Marcos Lilljedahl
1d37f98efd Add content-type in CORS allowed headers for microsoft edge to work =S 2017-01-25 22:31:45 -03:00
Marcos Lilljedahl
f2fe0e3137 Configure CORS correctly 2017-01-13 20:40:14 -03:00
Marcos Lilljedahl
4616cb1f5d Add CORS handlers to support SDK 2017-01-13 19:29:39 -03:00
Marcos Lilljedahl
c1cfc7958a Revert "Add CORS to create session and make it return text plain session ID"
This reverts commit c81a712a28eba960a4bcdc078cb51a1a4f832dbb.
2017-01-13 19:27:07 -03:00
Marcos Lilljedahl
c81a712a28 Add CORS to create session and make it return text plain session ID 2017-01-13 19:23:41 -03:00
Marcos Nils
dea778440e Add TLS certificates for machine drivers (#73) 2016-12-27 18:53:50 +02:00
Jonathan Leibiusky
70eaf37d4b Add metrics (#70)
* Add prometheus support to count sessions, instances and clientes over
time

* Track counters on server reload

* Change to gauges
2016-12-15 17:12:17 -08:00
Alex Ellis
5eda323477 Enable use of override for session timeout in hours, fix captcha bypass bug. (#51)
* - Enable use of override for session timeout. This is more useful than having to hard-code and rebuild the code for the previous 4 hour limit. Just set environmental variable and start the app.
- Future work may involve breaking down into minutes, but this is a good minimum delivery to provide value to end-user/developer.

- Fixes bug in Captcha code by introducing new landing page. This is not a new go template, it's a separate HTML file because SRP - single reponsibility principle. Happy for this to be refacted after merging commit.

- Fix for including Docker 1.12 override has been removed for later PR.

* Merge

* Reinstate 'material' JS include'

* https for JS includes

* HTTPs for JS in bypass
2016-11-30 20:17:18 +02:00
Jonathan Leibiusky @xetorthio
6af6f42721 Make regex more restrictive to allow the proxy to be more deterministic.
Make it to not depend on a specific TLD.
2016-11-23 11:52:59 -03:00
Jonathan Leibiusky @xetorthio
b4ce06fa20 Reuse the same proxy handler 2016-11-23 11:52:59 -03:00
Jonathan Leibiusky @xetorthio
122118b9df Allow to specify port, and remove session id.
So now the way to address a node is in the form of:
`ip10_0_1_9-9200.play-with-docker.com`
2016-11-23 11:52:59 -03:00
Jonathan Leibiusky @xetorthio
ec9d34ffda Add reverse proxy endpoint.
It works by using the Host of the request. When it receives something in
the form of: `<node>.<session>.play-with-docker.com` it does a reverse
proxy http request to `node`, validating that the `node` actually belongs
to the `session`.
If the node has a prefix `ip` and continues with a valid IP address
where the dots where replaces by underscores (like `ip10_0_0_1`) then it
will remove the `ip` prefix and and replace the underscores by dots, and
assume it is an ip address.
2016-11-23 11:52:59 -03:00
Alex Ellis
11f2f48ebe Introduce flag for TCP port 2016-11-23 08:58:08 +00:00
Jonathan Leibiusky @xetorthio
af9986c0f8 Validates that user is a human.
Add google recaptcha as an initial page before creating any session.
To configure recaptcha there are 2 environment variables that are needed
`GOOGLE_RECAPTCHA_SITE_KEY` and `GOOGLE_RECAPTCHA_SITE_SECRET`.
The code contains development defaults that should be set in production
to real values.
**NOTICE: Development defaults assume that the domain is `localhost`**
2016-11-15 16:53:44 -03:00
Jonathan Leibiusky @xetorthio
70c4d33e6b Add robots file 2016-11-15 14:58:11 -03:00
Marcos Lilljedahl
23bb4eaf69 Add session persistence and use attach instead of exec 2016-11-14 21:29:32 -03:00
Jonathan Leibiusky (@xetorthio)
8e4981d24f Huge refactor to have everything working with socket.io
It fixes lots of bugs, can fallback to long polling, resize viewport of
terminals and share clients state of the session, so they all see the
same thing.
2016-11-10 10:42:08 -03:00
Marcos Lilljedahl
a56af3dc22 Refactor sessions and add locking to avoid concurrent requests to create
more instances
2016-10-14 12:54:25 -03:00
Marcos Lilljedahl
62936fcfc9 Change attach URL 2016-10-08 10:32:40 +02:00
Jonathan Leibiusky (@xetorthio)
b6b849e2c6 Change import paths
Add session cleanup
2016-10-08 10:25:10 +02:00
Marcos Lilljedahl
0d693b344c Add ping handler and listen on tcp4 addresses 2016-10-08 03:26:22 +02:00
Jonathan Leibiusky (@xetorthio)
dde49d8700 Initial commit 2016-10-08 03:12:48 +02:00