Skip to content

Commit fd3ad09

Browse files
committed
rpn: impl TestWin() for new hosts
1 parent c0fe3a3 commit fd3ad09

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

intra/ipn/warp/cfg.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ func WarpEndpoints() (v4 netip.AddrPort, v6 netip.AddrPort, err error) {
167167

168168
func WinEndpoints() (v4 []netip.AddrPort, v6 []netip.AddrPort, err error) {
169169
var v4ok, v6ok bool
170-
for _, u := range []string{wsProdUrl, wsProdUrl2} {
170+
for _, u := range []string{svchost, wsMyIp2, wsMyIp} {
171+
// svchost is a host, but url.Parse will work
171172
for _, ip := range dialers.ResolveForUrl(u) {
172173
if ipok(ip) {
173174
if ip.Is4() {

intra/ipn/warp/yegor.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import (
2828
// github.com/Windscribe/browser-extension/blob/ed83749ad/modules/ext/src/utils/constants.js#L31
2929
const (
3030
svchost = "svc.rethinkdns.com"
31-
// wsMyIp = "https://checkip.windscribe.com/"
32-
// wsMyIp2 = "https://checkip.totallyacdn.com/"
31+
wsMyIp = "https://checkip.windscribe.com/"
32+
wsMyIp2 = "https://checkip.totallyacdn.com/"
3333
)
3434

3535
const (
@@ -515,10 +515,10 @@ type WsServerListResponse struct {
515515
*/
516516
type WsSession struct {
517517
UserID string `json:"user_id"`
518-
// Account session token authenticates this user with the API to get
518+
// Encrypted account session token authenticates this user with the API to get
519519
// and set any state, incl WG configuration which are unique and bound
520520
// to each session token. Session token is the "bearer token".
521-
// The session/bearer token is of shape, id:type:timestamp:sig1:sig2.
521+
// Unencrypted session/bearer token is of shape, id:type:timestamp:sig1:sig2.
522522
// However it could change to a new format in the future.
523523
SessionToken string `json:"session_auth_hash"`
524524
Username string `json:"username"`
@@ -678,7 +678,7 @@ type WsWgConfig struct {
678678
"kind": "ws#v1",
679679
"cid": "hex", // Identifier
680680
"sid": "id:epochsec:parentcidsig", // profile identifier, if any
681-
"sessiontoken": "id:typ:epochsec:sig1:sig2",
681+
"sessiontoken": enc("id:typ:epochsec:sig1:sig2"),
682682
"expiry": "2025-07-15T00:00:00Z", // Expiry date of the entitlement
683683
"status": "valid" // "valid" | "invalid" | "banned" | "expired" | "unknown"
684684
"test": false // true if this is a test entitlement
@@ -688,7 +688,7 @@ type WsEntitlement struct {
688688
Kind string `json:"kind"` // e.g. "ws#v1"
689689
Cid string `json:"cid"` // Client ID
690690
Sid string `json:"pid,omitempty"` // Share ID
691-
SessionToken string `json:"sessiontoken"` // Session token
691+
SessionToken string `json:"sessiontoken"` // Encrypted session token
692692
// Expiry date of the entitlement; go.dev/play/p/d2gshytEF61
693693
Expiry time.Time `json:"expiry"`
694694
Status string `json:"status"` // "valid" | "invalid" | "banned" | "expired" | "unknown"

0 commit comments

Comments
 (0)