Skip to content

Commit f74945a

Browse files
committed
(squash before merge) srvPort -> localhostPort
1 parent f7ffd7a commit f74945a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tailscale.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern int TsnetGetIps(int sd, char *buf, size_t buflen);
2323
extern int TsnetGetRemoteAddr(int listener, int conn, char *buf, size_t buflen);
2424
extern int TsnetListen(int sd, char* net, char* addr, int* listenerOut);
2525
extern int TsnetLoopback(int sd, char* addrOut, size_t addrLen, char* proxyOut, char* localOut);
26-
extern int TsnetEnableFunnelToLocalhostPlaintextHttp1(int sd, int srvPort);
26+
extern int TsnetEnableFunnelToLocalhostPlaintextHttp1(int sd, int localhostPort);
2727

2828
tailscale tailscale_new() {
2929
return TsnetNewServer();
@@ -108,6 +108,6 @@ int tailscale_errmsg(tailscale sd, char* buf, size_t buflen) {
108108
return TsnetErrmsg(sd, buf, buflen);
109109
}
110110

111-
int tailscale_enable_funnel_to_localhost_plaintext_http1(tailscale sd, int srvPort) {
112-
return TsnetEnableFunnelToLocalhostPlaintextHttp1(sd, srvPort);
111+
int tailscale_enable_funnel_to_localhost_plaintext_http1(tailscale sd, int localhostPort) {
112+
return TsnetEnableFunnelToLocalhostPlaintextHttp1(sd, localhostPort);
113113
}

tailscale.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ func TsnetLoopback(sd C.int, addrOut *C.char, addrLen C.size_t, proxyOut *C.char
535535
}
536536

537537
//export TsnetEnableFunnelToLocalhostPlaintextHttp1
538-
func TsnetEnableFunnelToLocalhostPlaintextHttp1(sd C.int, srvPort C.int) C.int {
538+
func TsnetEnableFunnelToLocalhostPlaintextHttp1(sd C.int, localhostPort C.int) C.int {
539539
s, err := getServer(sd)
540540
if err != nil {
541541
return s.recErr(err)
@@ -554,7 +554,7 @@ func TsnetEnableFunnelToLocalhostPlaintextHttp1(sd C.int, srvPort C.int) C.int {
554554
domain := st.CertDomains[0]
555555

556556
hp := ipn.HostPort(net.JoinHostPort(domain, strconv.Itoa(443)))
557-
tcpForward := fmt.Sprintf("127.0.0.1:%d", srvPort)
557+
tcpForward := fmt.Sprintf("127.0.0.1:%d", localhostPort)
558558
sc := &ipn.ServeConfig{
559559
TCP: map[uint16]*ipn.TCPPortHandler{
560560
443: {

tailscale.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ extern int tailscale_loopback(tailscale sd, char* addr_out, size_t addrlen, char
189189
// Returns:
190190
// 0 - success
191191
// -1 - other error, details printed to the tsnet logger
192-
extern int tailscale_enable_funnel_to_localhost_plaintext_http1(tailscale sd, int srvPort);
192+
extern int tailscale_enable_funnel_to_localhost_plaintext_http1(tailscale sd, int localhostPort);
193193

194194
// tailscale_errmsg writes the details of the last error to buf.
195195
//

0 commit comments

Comments
 (0)