2021-07-22 20:22:58 +00:00
|
|
|
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2022-06-09 00:14:37 +00:00
|
|
|
//go:build js
|
|
|
|
// +build js
|
2021-07-22 20:22:58 +00:00
|
|
|
|
|
|
|
package portmapper
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"inet.af/netaddr"
|
|
|
|
)
|
|
|
|
|
2022-03-16 23:27:57 +00:00
|
|
|
type upnpClient any
|
2021-07-22 20:22:58 +00:00
|
|
|
|
2021-08-03 05:09:50 +00:00
|
|
|
type uPnPDiscoResponse struct{}
|
|
|
|
|
|
|
|
func parseUPnPDiscoResponse([]byte) (uPnPDiscoResponse, error) {
|
|
|
|
return uPnPDiscoResponse{}, nil
|
2021-07-22 20:22:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) getUPnPPortMapping(
|
|
|
|
ctx context.Context,
|
|
|
|
gw netaddr.IP,
|
|
|
|
internal netaddr.IPPort,
|
|
|
|
prevPort uint16,
|
|
|
|
) (external netaddr.IPPort, ok bool) {
|
|
|
|
return netaddr.IPPort{}, false
|
|
|
|
}
|