-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4832bd4
commit 068e98e
Showing
82 changed files
with
16,594 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Server configurations | ||
server: | ||
enabled: true # enable the GRPC/HTTP/websocket server | ||
grpc_addr: 127.0.0.1:8881 #IP:port for GRPC | ||
http_addr: 127.0.0.1:8882 #IP:port for HTTP/websocket | ||
# Redis DB configurations | ||
sqlite3: | ||
username: admin | ||
password: supersecretpassword # this will get moved to environment variable or generated dynamically | ||
###### DO NOT EDIT THE BELOW SECTION##### | ||
# Services | ||
service_list: | ||
- service_type: federate | ||
active: true | ||
custom_record_number: 100000 | ||
additional_service_data: | ||
- service_type: vpn | ||
active: true | ||
custom_record_number: 200000 | ||
additional_service_data: | ||
- service_type: message | ||
active: true | ||
custom_record_number: 400000 | ||
additional_service_data: | ||
- service_type: socket | ||
active: true | ||
custom_record_number: 500000 | ||
additional_service_data: | ||
- service_type: sign | ||
active: true | ||
custom_record_number: 800000 | ||
additional_service_data: | ||
###### DO NOT EDIT THE ABOVE SECTION##### | ||
|
||
# Lightning | ||
lightning: | ||
lnd_node: | ||
ip: 127.0.0.1 #IP of your LND node | ||
port: 10001 #GRPC port of your LND node | ||
pub_key: asdfasdfasdf #get your LND pubkey with "lncli getinfo" | ||
tls_cert: /path/to/tls.cert | ||
admin_macaroon: /path/to/admin.macaroon | ||
federate: | ||
ttl: 31560000 #Federation auto delete in seconds | ||
imp_id: YOUR_IMP_ID #plain text string of your IMP node name | ||
vpn: | ||
price: 100 #per hour | ||
server_ip: 127.0.0.1 #public IP of your VPN server | ||
server_port: 51820 #port you want to listen on | ||
subnet: 10.0.0.0/24 #subnet you want to give to your clients. .1 == your server IP. | ||
server_pub_key: asdfasdfasdf #get this from your WG public key file | ||
allowed_ips: 0.0.0.0/0 #what subnets clients can reach. Default is entire world. | ||
binary_path: /usr/bin/wg #where your installed the "wg" command. | ||
dns: 8.8.8.8 #set your preferred DNS server here. | ||
socket: | ||
server_ip: 1.1.1.1 #public IP of your socket server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# Protocol Documentation | ||
<a name="top"></a> | ||
|
||
<!-- | ||
## Table of Contents | ||
{{range .Files}} | ||
{{$file_name := .Name}}- [{{.Name}}](#{{.Name}}) | ||
{{- if .Messages }} | ||
{{range .Messages}} - [{{.LongName}}](#{{.FullName}}) | ||
{{end}} | ||
{{- end -}} | ||
{{- if .Enums }} | ||
{{range .Enums}} - [{{.LongName}}](#{{.FullName}}) | ||
{{end}} | ||
{{- end -}} | ||
{{- if .Extensions }} | ||
{{range .Extensions}} - [File-level Extensions](#{{$file_name}}-extensions) | ||
{{end}} | ||
{{- end -}} | ||
{{- if .Services }} | ||
{{range .Services}} - [{{.Name}}](#{{.FullName}}) | ||
{{end}} | ||
{{- end -}} | ||
{{end}} | ||
- [Scalar Value Types](#scalar-value-types) | ||
|
||
{{range .Files}} | ||
{{$file_name := .Name}} | ||
<a name="{{.Name}}"></a> | ||
<p align="right"><a href="#top">Top</a></p> | ||
|
||
--> | ||
|
||
## {{.Name}} | ||
{{.Description}} | ||
|
||
|
||
{{range .Services}}{{ $service := . }} | ||
<a name="{{.FullName}}"></a> | ||
|
||
### {{.Name}} | ||
{{.Description}} | ||
|
||
| Method Name | Request Type | Response Type | Description | | ||
| ----------- | ------------ | ------------- | ------------| | ||
{{range .Methods -}} | ||
| {{.Name}} | {{.RequestLongType}}{{if .RequestStreaming}} stream{{end}} | {{.ResponseLongType}}{{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | | ||
{{end}} | ||
|
||
|
||
{{- if $service.MethodsWithOption "google.api.http" }} | ||
|
||
#### HTTP bindings | ||
|
||
| Method Name | Method | Pattern | | ||
| ----------- | ------ | ------- | | ||
{{- range $service.MethodsWithOption "google.api.http" }}{{ $method := . }} | ||
{{- range (.Option "google.api.http").Rules }} | ||
| `{{ $method.Name }}` | `{{ .Method }}` | `{{ .Pattern }}` | ||
{{- end -}} | ||
{{- end -}} | ||
{{ end -}} | ||
|
||
|
||
|
||
{{end}} <!-- end services --> | ||
|
||
|
||
{{range .Messages}} | ||
<a name="{{.FullName}}"></a> | ||
|
||
### {{.LongName}} | ||
{{.Description}} | ||
|
||
{{if .HasFields}} | ||
| Field | Type | Label | Description | | ||
| ----- | ---- | ----- | ----------- | | ||
{{range .Fields -}} | ||
| {{.Name}} | {{.LongType}} | {{.Label}} | {{if (index .Options "deprecated"|default false)}}**Deprecated.** {{end}}{{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | | ||
{{end}} | ||
{{end}} | ||
|
||
{{if .HasExtensions}} | ||
| Extension | Type | Base | Number | Description | | ||
| --------- | ---- | ---- | ------ | ----------- | | ||
{{range .Extensions -}} | ||
| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | | ||
{{end}} | ||
{{end}} | ||
|
||
{{end}} <!-- end messages --> | ||
|
||
{{range .Enums}} | ||
<a name="{{.FullName}}"></a> | ||
|
||
### {{.LongName}} | ||
{{.Description}} | ||
|
||
| Name | Number | Description | | ||
| ---- | ------ | ----------- | | ||
{{range .Values -}} | ||
| {{.Name}} | {{.Number}} | {{nobr .Description}} | | ||
{{end}} | ||
|
||
{{end}} <!-- end enums --> | ||
|
||
{{if .HasExtensions}} | ||
<a name="{{$file_name}}-extensions"></a> | ||
|
||
### File-level Extensions | ||
| Extension | Type | Base | Number | Description | | ||
| --------- | ---- | ---- | ------ | ----------- | | ||
{{range .Extensions -}} | ||
| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | | ||
{{end}} | ||
{{end}} <!-- end HasExtensions --> | ||
|
||
{{ end -}} | ||
|
||
|
||
## Scalar Value Types | ||
|
||
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | | ||
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | | ||
{{range .Scalars -}} | ||
| <a name="{{.ProtoType}}" /> {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} | {{.GoType}} | {{.CSharp}} | {{.PhpType}} | {{.RubyType}} | | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
# Protocol Documentation | ||
<a name="top"></a> | ||
|
||
<!-- | ||
## Table of Contents | ||
- [proto/imp/api/federate/federate.proto](#proto/imp/api/federate/federate.proto) | ||
- [LeaveFederationRequest](#federate.LeaveFederationRequest) | ||
- [LeaveFederationResponse](#federate.LeaveFederationResponse) | ||
- [RequestFederateRequest](#federate.RequestFederateRequest) | ||
- [RequestFederateResponse](#federate.RequestFederateResponse) | ||
- [Federate](#federate.Federate) | ||
- [Scalar Value Types](#scalar-value-types) | ||
<a name="proto/imp/api/federate/federate.proto"></a> | ||
<p align="right"><a href="#top">Top</a></p> | ||
--> | ||
|
||
## proto/imp/api/federate/federate.proto | ||
Allows for p2p federation between Impervious nodes | ||
|
||
|
||
|
||
<a name="federate.Federate"></a> | ||
|
||
### Federate | ||
|
||
|
||
| Method Name | Request Type | Response Type | Description | | ||
| ----------- | ------------ | ------------- | ------------| | ||
| RequestFederate | RequestFederateRequest | RequestFederateResponse | RequestFederation performs the federation request to a specific peer. | | ||
| LeaveFederation | LeaveFederationRequest | LeaveFederationResponse | LeaveFederation performs the removal of a federated peer (upon message receipt). | | ||
|
||
|
||
#### HTTP bindings | ||
|
||
| Method Name | Method | Pattern | | ||
| ----------- | ------ | ------- | | ||
| `RequestFederate` | `POST` | `/v1/federate/request` | ||
| `LeaveFederation` | `POST` | `/v1/federate/leave` <!-- end services --> | ||
|
||
|
||
|
||
<a name="federate.LeaveFederationRequest"></a> | ||
|
||
### LeaveFederationRequest | ||
Represents a request to leave a federation from a far end node | ||
|
||
|
||
| Field | Type | Label | Description | | ||
| ----- | ---- | ----- | ----------- | | ||
| pubkey | string | | The public key of the far end LND node running IMP | | ||
|
||
|
||
|
||
|
||
|
||
|
||
<a name="federate.LeaveFederationResponse"></a> | ||
|
||
### LeaveFederationResponse | ||
Represents a response back from a Leave Federation Request | ||
|
||
|
||
| Field | Type | Label | Description | | ||
| ----- | ---- | ----- | ----------- | | ||
| id | string | | returned message ID | | ||
|
||
|
||
|
||
|
||
|
||
|
||
<a name="federate.RequestFederateRequest"></a> | ||
|
||
### RequestFederateRequest | ||
Represents a request to federate with a far end node | ||
|
||
|
||
| Field | Type | Label | Description | | ||
| ----- | ---- | ----- | ----------- | | ||
| pubkey | string | | The public key of the far end LND node running IMP | | ||
|
||
|
||
|
||
|
||
|
||
|
||
<a name="federate.RequestFederateResponse"></a> | ||
|
||
### RequestFederateResponse | ||
Represents a response back from a Federation Request | ||
|
||
|
||
| Field | Type | Label | Description | | ||
| ----- | ---- | ----- | ----------- | | ||
| id | string | | returned message ID | | ||
|
||
|
||
|
||
|
||
|
||
<!-- end messages --> | ||
|
||
<!-- end enums --> | ||
|
||
<!-- end HasExtensions --> | ||
|
||
## Scalar Value Types | ||
|
||
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | | ||
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | | ||
| <a name="double" /> double | | double | double | float | float64 | double | float | Float | | ||
| <a name="float" /> float | | float | float | float | float32 | float | float | Float | | ||
| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | | ||
| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | | ||
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | | ||
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | | ||
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | | ||
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | | ||
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | | ||
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | | ||
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | | ||
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | | ||
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | | ||
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | | ||
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | |
Oops, something went wrong.