Skip to content
Permalink
Browse files

Proto

  • Loading branch information
dunglas committed Sep 4, 2019
0 parents commit 438223aab085e6a6cacf9910164767780e78b2ab
Showing with 1,751 additions and 0 deletions.
  1. +8 −0 .env
  2. +5 −0 .gitignore
  3. +47 −0 .goreleaser.yml
  4. +40 −0 CONTRIBUTING.md
  5. +37 −0 COPYRIGHT
  6. +5 −0 Dockerfile
  7. +661 −0 LICENSE
  8. +406 −0 README.md
  9. +7 −0 docker-compose.yml
  10. +37 −0 fixtures/fixtures.js
  11. +68 −0 fixtures/main.go
  12. +20 −0 fixtures/tls/server.crt
  13. +27 −0 fixtures/tls/server.key
  14. +23 −0 gateway/buffered_response_writer.go
  15. +62 −0 gateway/gateway.go
  16. +6 −0 gateway/json_pointer.go
  17. +11 −0 gateway/json_pointer_test.go
  18. +81 −0 gateway/options.go
  19. +88 −0 gateway/server.go
  20. +16 −0 go.mod
  21. +63 −0 go.sum
  22. +33 −0 main.go
8 .env
@@ -0,0 +1,8 @@
UPSTREAM=http://localhost:8080
ACME_CERT_DIR=
ACME_HOSTS=
ADDR=:3000
ALLOW_ANONYMOUS=1
CERT_FILE=fixtures/tls/server.crt
KEY_FILE=fixtures/tls/server.key
LOG_FORMAT=JSON
@@ -0,0 +1,5 @@
/vulcain
/vendor
/spec/vulcain.html
/spec/vulcain.txt
/spec/vulcain.xml
@@ -0,0 +1,47 @@
before:
hooks:
- go mod download
builds:
-
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- 386
- amd64
- arm
- arm64
archive:
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- COPYRIGHT
- LICENSE
- README.md
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
-
image_templates:
- 'dunglas/vulcain:{{ .Tag }}'
- 'dunglas/vulcain:v{{ .Major }}'
- 'dunglas/vulcain:v{{ .Major }}.{{ .Minor }}'
- 'dunglas/vulcain:latest'
@@ -0,0 +1,40 @@
# Contributing

## Gateway

Clone the project:

$ git clone https://github.com/dunglas/vulcain


Install the dependencies:

$ cd vulcain
$ go get

Run the server:

$ go run main.go

Go to `https://localhost:3000` and enjoy!

To run the test suite:

$ go test -v -timeout 30s github.com/dunglas/vulcain/hub

## Protocol

The protocol is written in Markdown, compatible with [Mmark](https://mmark.nl/).
It is then converted in the [the "xml2rfc" Version 3 Vocabulary](https://tools.ietf.org/html/rfc7991).

To contribute to the protocol itself:

* Make your changes
* [Download Mmark](https://github.com/mmarkdown/mmark/releases)
* [Download `xml2rfc` using pip](https://pypi.org/project/xml2rfc/): `pip install xml2rfc`
* Format the Markdown file: `mmark -markdown -w spec/vulcain.md`
* Generate the XML file: `mmark spec/vulcain.md > spec/vulcain.xml`
* Add the `docName` attribute to the `<rfc>` element (example: `docName="draft-dunglas-vulcain-04"`)
* Validate the generated XML file and generate the text file: `xml2rfc --text --v3 spec/vulcain.xml`
* Remove non-ASCII characters from the generated `vulcain.txt` file (example: K**é**vin)
* If appropriate, be sure to update the reference implementation accordingly
@@ -0,0 +1,37 @@
Copyright (C) 2019-present Kévin Dunglas

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License, version 3,
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

As a special exception, the copyright holders give permission to link the
code of portions of this program with the OpenSSL library under certain
conditions as described in each individual source file and distribute
linked combinations including the program with the OpenSSL library. You
must comply with the GNU Affero General Public License in all respects
for all of the code used other than as permitted herein. If you modify
file(s) with this exception, you may extend this exception to your
version of the file(s), but you are not obligated to do so. If you do not
wish to do so, delete this exception statement from your version. If you
delete this exception statement from all source files in the program,
then also delete it in the license file.

The copyright holders provide the following statement as a clarification
of the conditions of this License. This statement is not a further
restriction. It will be deemed a legal notice allowed under Section 7b,
and must accordingly be preserved in any redistribution of the Program.
This clarification applies to the vulcain licensed hereunder by
Kévin Dunglas. The Corresponding Source of the Program includes any
software that interacts with the Program and contains functionality to
provision or manage the Program for the purpose of enabling third-party
users to interact with the Program remotely through a computer network,
and any such software that is added to or combined with the Program
constitutes modification that produces a work based on the Program.
@@ -0,0 +1,5 @@
FROM scratch
COPY vulcain /
COPY public ./public/
CMD ["./vulcain"]
EXPOSE 80 443

0 comments on commit 438223a

Please sign in to comment.
You can’t perform that action at this time.