Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using WebRTC to transfer data #45

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val scala3Version = "3.3.0"
val scala3Version = "3.3.1"

maintainer := "timzaak<[email protected]>"

Expand Down Expand Up @@ -26,6 +26,7 @@ lazy val app = project
libraryDependencies ++=
Seq(
"org.eclipse.jetty" % "jetty-webapp" % "11.0.15" % "container;compile",
"org.postgresql" % "postgresql" % "42.6.0",
"org.bouncycastle" % "bcprov-jdk18on" % "1.72", // for x25519,
"org.scalameta" %% "munit" % "0.7.29" % Test
)
Expand Down
2 changes: 1 addition & 1 deletion client/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fornet"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

[[bin]]
Expand Down
21 changes: 10 additions & 11 deletions protobuf/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,29 @@ option java_package = "com.timzaak.fornet.protobuf";

enum Protocol {
Protocol_TCP = 0;
Protocol_UDP = 1;
Protocol_UDP = 1; //webrtc-rs only support udp
}

message Interface {
optional string name = 1;
repeated string address = 2;
int32 listen_port = 3;
repeated string address = 2; //ip
int32 listen_port = 3; // wirguard port, webrtc does not need it
// optional string private_key = 4; // this is no needed now, we may support it in future version
repeated string dns = 5;
optional uint32 mtu = 6;
optional string pre_up = 7;
optional string post_up = 8;
optional string post_up = 8; // wireguard relay need it
optional string pre_down = 9;
optional string post_down = 10;
optional string post_down = 10; // wireguard relay need it
Protocol protocol = 11;
}

message Peer {
optional string endpoint = 1;
repeated string allowed_ip = 2;
string public_key = 3;
uint32 persistence_keep_alive = 4;
// This is for tcp
repeated string address = 5;
optional string endpoint = 1; // wireguard relay
repeated string allowed_ip = 2; // ACL, but now wireguard normal node does not support this
string public_key = 3;
uint32 persistence_keep_alive = 4; // wireguard param, can used for webrtc
repeated string address = 5; // ip, should be contained by allowed_ip?
}


Expand Down
8 changes: 8 additions & 0 deletions relay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/target
.idea
*dist*
*node_modules*
/workflow
build/
.DS_Store
turn_server.dev.toml
Loading