You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 20, 2023. It is now read-only.
We bind to the `default gateway` network interface inside the codespace and forward all non-routed traffic to the `SSH tunnel` that connects a Codespace with your local machine. We forward only `L3` (`IP`) traffic and there are few criterias must hold for traffic to be forwarded:
76
-
77
-
- it must appear on the `default gateway`
78
-
- it must not be addressed tosomething that is on default gateway subnet
79
-
80
-
This ensures that we fallback to forwaring packets only if they were not handled by any other network interface inside a Codespace.
81
-
82
-
Once a packet reaches the local machine, we see if we can forward it to a meaningful destination, for that we resolve network interface that can handle the packet destination. Such network interface must not be a default gateway interface given that the packet destination is not to the gateway subnet, otherwise the packet is addressed to the internet which can be handled from within the codespace directly.
83
-
84
-
If such network interface is found, we create a local `network socket` and a `NAT` record for the connection. The NAT record is used to map the remote packet source address to the local network socket address, so it appears to the remote resource as if traffic is coming from the local machine. When a reply packet is received, we perform reverse address translation and send the packet back to the codespace (so it appears as if the reply came directly from the codespace default gateway interface).
85
-
86
-
For `DNS` packets, we register an address that is on the `default gateway` subnet which allows to catch all unresolved `DNS` queries. Once `DNS` packet is received, it is passed over to the `local machine` where the request to the local `DNS` resolver is made and a reply is sent back to the codespace.
87
-
88
-
The extension is written in `Rust` and provides high preformance, low memory footprint and memory safety, hence must cause low latency.
✅ - currently supported 🏃 - support in progress 🙅 - not applicable
109
-
110
-
### DNS Record Type Support
111
-
112
-
| DNS Record Type | Status |
113
-
|-----------------|--------|
114
-
| A | ✅ |
115
-
| AAAA | ✅ |
116
-
| CNAME | ✅ |
117
-
| NS | ✅ |
118
-
| TXT | ✅ |
119
-
| SOA | ✅ |
120
-
| PTR | ✅ |
121
-
| NULL | ✅ |
122
-
| MX | ✅ |
123
-
| ANY | ✅ |
124
-
125
-
### Transport layer protocol support
126
-
127
-
Currently only `TCP`, `UDP` and `ICMP` protocols were tested extensively:
128
-
129
-
| Transport protocol | Status |
130
-
|--------------------|--------|
131
-
| TCP | ✅ |
132
-
| UDP | ✅ |
133
-
| ICMP | ✅ |
134
-
| SCTP | ? |
135
-
| DCCP | ? |
136
-
| RSVP | ? |
137
-
| QUIC | ? |
138
-
139
-
### Network layer protocol support
140
-
141
-
Currently only `IPv4` is supported and was tested extensively:
142
-
143
-
| Network protocol | Status |
144
-
|--------------------|--------|
145
-
| IPv4 | ✅ |
146
-
| IPv6 | ? |
147
-
| IGMP | ? |
148
-
| NDP | ? |
149
-
| ECN | ? |
150
-
| IPSec | ? |
74
+
### Mac OSx
151
75
152
-
## Troubleshooting
153
-
154
-
- To create a [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
155
-
- To create a [Feature request](https://github.com/github/gh-net/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=).
156
-
157
-
Please search for existing issues before creating a new one.
> My local machine network configuration has changed but extension does not pick up the changes.
81
+
### Linux
162
82
163
-
- Please restart the extension by pressing `q` and connecting to the Codespace again. The extension currently does not watch for changes in network configuration and hence does not detect new network interfaces or changes in interfaces config. This will be fixed in the future.
> I'm getting an error an a stack trace immediatelly after starting the extension.
96
+
### Windows
166
97
167
-
- Most likely you forgot to use `sudo` to run the extension. If `sudo` was used, please create a [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
> Extension suddenly stops working after some time and I see some stack traces in the console.
103
+
<br />
170
104
171
-
Most likely `SSH` connection was dropped or there was an intermittent network issue on your machine. The extension does not currently reconnects to the Codespace automatically. This will be fixed in the future. If this happens too often, please create a [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
105
+
Legend: ✅ - currently supported 🏃 - in progress 🙅 - not applicable `?` - unknown / not tested
172
106
173
-
> I'm trying to send `Ethernet Datagrams`(L2 network layer) directly and expect those to be forwarded but they are not.
107
+
<br />
174
108
175
-
The extension currently forwards `IP`(L3 network layer) traffic and above. If the datagrams contain `IP` packets that are addressed to a remote resource addressible from your local machine it should work. If it does not, please create a [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=). If you want to send `Ethernet Datagrams` directly, please create a [Feature request](https://github.com/github/gh-net/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=), we would love to know about your use case!
109
+
For list of supported network protocols refer to [this doc](./docs/SUPPORTED_NETWORK_PROTOCOLS.md).
176
110
177
-
> I'm using some transport protocol that does not work.
111
+
## Troubleshooting
178
112
179
-
Currently `TCP`/`UDP` and `ICMP` are supported. Other protocols should work but were not tested extensivelly. Please create [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=) so we can address the issue.
113
+
- Something is missing? Please create a [✨ feature request](https://github.com/github/gh-net/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=).
114
+
- Something is incorrect? Please create a [🐛 bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
115
+
- For list of known issues refer to [👉 this doc](./docs/KNOWN_ISSUES.md).
We bind to the `default gateway` network interface inside the codespace and forward all non-routed traffic to the `SSH tunnel` that connects a Codespace with your local machine. We forward only `L3` (`IP`) traffic and there are few criterias must hold for traffic to be forwarded:
10
+
11
+
- it must appear on the `default gateway`
12
+
- it must not be addressed tosomething that is on default gateway subnet
13
+
14
+
This ensures that we fallback to forwaring packets only if they were not handled by any other network interface inside a Codespace.
15
+
16
+
Once a packet reaches the local machine, we see if we can forward it to a meaningful destination, for that we resolve network interface that can handle the packet destination. Such network interface must not be a default gateway interface given that the packet destination is not to the gateway subnet, otherwise the packet is addressed to the internet which can be handled from within the codespace directly.
17
+
18
+
If such network interface is found, we create a local `network socket` and a `NAT` record for the connection. The NAT record is used to map the remote packet source address to the local network socket address, so it appears to the remote resource as if traffic is coming from the local machine. When a reply packet is received, we perform reverse address translation and send the packet back to the codespace (so it appears as if the reply came directly from the codespace default gateway interface).
19
+
20
+
For `DNS` packets, we register an address that is on the `default gateway` subnet which allows to catch all unresolved `DNS` queries. Once `DNS` packet is received, it is passed over to the `local machine` where the request to the local `DNS` resolver is made and a reply is sent back to the codespace.
21
+
22
+
The extension is written in `Rust` and provides high preformance, low memory footprint and memory safety, hence must cause low latency.
> My local machine network configuration has changed but extension does not pick up the changes.
4
+
5
+
- Please restart the extension by pressing `q` and connecting to the Codespace again. The extension currently does not watch for changes in network configuration and hence does not detect new network interfaces or changes in interfaces config. This will be fixed in the future.
6
+
7
+
> I'm getting an error an a stack trace immediatelly after starting the extension.
8
+
9
+
- Most likely you forgot to use `sudo` to run the extension. If `sudo` was used, please create a [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
10
+
11
+
> Extension suddenly stops working after some time and I see some stack traces in the console.
12
+
13
+
Most likely `SSH` connection was dropped or there was an intermittent network issue on your machine. The extension does not currently reconnects to the Codespace automatically. This will be fixed in the future. If this happens too often, please create a [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
14
+
15
+
> I'm trying to send `Ethernet Datagrams`(L2 network layer) directly and expect those to be forwarded but they are not.
16
+
17
+
The extension currently forwards `IP`(L3 network layer) traffic and above. If the datagrams contain `IP` packets that are addressed to a remote resource addressible from your local machine it should work. If it does not, please create a [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=). If you want to send `Ethernet Datagrams` directly, please create a [Feature request](https://github.com/github/gh-net/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=), we would love to know about your use case!
18
+
19
+
> I'm using some transport protocol that does not work.
20
+
21
+
Currently `TCP`/`UDP` and `ICMP` are supported. Other protocols should work but were not tested extensivelly. Please create [Bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=) so we can address the issue.
Currently only `IPv4` is supported and was tested extensively:
7
+
8
+
| Network protocol | Status |
9
+
|--------------------|--------|
10
+
| IPv4 | ✅ |
11
+
| IPv6 | ? |
12
+
| IGMP | ? |
13
+
| NDP | ? |
14
+
| ECN | ? |
15
+
| IPSec | ? |
16
+
17
+
### Transport layer protocol support
18
+
19
+
Currently only `TCP`, `UDP` and `ICMP` protocols were tested extensively:
20
+
21
+
| Transport protocol | Status |
22
+
|--------------------|--------|
23
+
| TCP | ✅ |
24
+
| UDP | ✅ |
25
+
| ICMP | ✅ |
26
+
| SCTP | ? |
27
+
| DCCP | ? |
28
+
| RSVP | ? |
29
+
| QUIC | ? |
30
+
31
+
### DNS Record Type Support
32
+
33
+
| DNS Record Type | Status |
34
+
|-----------------|--------|
35
+
| A | ✅ |
36
+
| AAAA | ✅ |
37
+
| CNAME | ✅ |
38
+
| NS | ✅ |
39
+
| TXT | ✅ |
40
+
| SOA | ✅ |
41
+
| PTR | ✅ |
42
+
| NULL | ✅ |
43
+
| MX | ✅ |
44
+
| ANY | ✅ |
45
+
46
+
<br />
47
+
48
+
Legend: ✅ - currently supported 🏃 - in progress 🙅 - not applicable `?` - unknown / not tested
49
+
50
+
<br />
51
+
52
+
- Something is missing? Please create a [✨ feature request](https://github.com/github/gh-net/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=).
53
+
- Something is incorrect? Please create a [🐛 bug report](https://github.com/github/gh-net/issues/new?assignees=&labels=bug&template=bug_report.md&title=).
54
+
- For list of known issues refer to [👉 this doc](./docs/KNOWN_ISSUES.md).
0 commit comments