Skip to content

Commit

Permalink
更新修复部分DNS检测过程中查询的域名地址
Browse files Browse the repository at this point in the history
  • Loading branch information
spiritLHLS committed Jun 24, 2024
1 parent b7cd772 commit a9f7107
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 44 deletions.
7 changes: 4 additions & 3 deletions asia/Hotstar.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package asia

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// HotStar
// api.hotstar.com 双栈 get 请求
func HotStar(c *http.Client) model.Result {
name := "HotStar"
hostname := "hotstar.com"
hostname := "api.hotstar.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
12 changes: 6 additions & 6 deletions transnation/ChatGPT.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// OpenAI
// api.openai.com 仅 ipv4 且 get 请求
func OpenAI(c *http.Client) model.Result {
name := "ChatGPT"
hostname := "openai.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down Expand Up @@ -124,7 +124,7 @@ func OpenAI(c *http.Client) model.Result {
if location != "" {
loc := strings.ToLower(location)
exit := utils.GetRegion(loc, model.GptSupportCountry)
result1, result2, result3 := utils.CheckDNS(hostname)
result1, result2, result3 := utils.CheckDNS("api.openai.com")
unlockType := utils.GetUnlockType(result1, result2, result3)
if exit {
return model.Result{Name: name, Status: model.StatusYes, Region: loc, UnlockType: unlockType}
Expand All @@ -136,12 +136,12 @@ func OpenAI(c *http.Client) model.Result {
return model.Result{Name: name, Status: model.StatusYes}
}
} else if !unsupportedCountry && VPN && reqStatus1 {
result1, result2, result3 := utils.CheckDNS(hostname)
result1, result2, result3 := utils.CheckDNS("chat.openai.com")
unlockType := utils.GetUnlockType(result1, result2, result3)
return model.Result{Name: name, Status: model.StatusYes, Info: "Only Available with Web Browser",
UnlockType: unlockType}
} else if unsupportedCountry && !VPN && reqStatus2 {
result1, result2, result3 := utils.CheckDNS(hostname)
result1, result2, result3 := utils.CheckDNS("ios.chat.openai.com")
unlockType := utils.GetUnlockType(result1, result2, result3)
return model.Result{Name: name, Status: model.StatusYes, Info: "Only Available with Mobile APP",
UnlockType: unlockType}
Expand Down
5 changes: 3 additions & 2 deletions transnation/DAZN.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ package transnation

import (
"encoding/json"
"net/http"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"net/http"
)

// DAZN
// startup.core.indazn.com 仅 ipv4 且 post 请求
func DAZN(c *http.Client) model.Result {
name := "Dazn"
hostname := "indazn.com"
hostname := "startup.core.indazn.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
10 changes: 7 additions & 3 deletions transnation/IQiYi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// IQiYi
// www.iq.com 仅 ipv4 且 get 请求
func IQiYi(c *http.Client) model.Result {
name := "IQiYi"
hostname := "www.iq.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down Expand Up @@ -40,7 +42,9 @@ func IQiYi(c *http.Client) model.Result {
}
}
if region != "" {
return model.Result{Name: name, Status: model.StatusYes, Region: region}
result1, result2, result3 := utils.CheckDNS(hostname)
unlockType := utils.GetUnlockType(result1, result2, result3)
return model.Result{Name: name, Status: model.StatusYes, Region: region, UnlockType: unlockType}
} else {
return model.Result{Name: name, Status: model.StatusUnexpected,
Err: fmt.Errorf("get www.iq.com failed with head: %s", tp)}
Expand Down
7 changes: 4 additions & 3 deletions transnation/InstagramMusic.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// Instagram
// www.instagram.com 双栈 且 post 请求
func Instagram(c *http.Client) model.Result {
name := "Instagram Licensed Audio"
hostname := "instagram.com"
hostname := "www.instagram.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/KOCOWA.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// KOCOWA
// www.kocowa.com 仅 ipv4 且 get 请求
func KOCOWA(c *http.Client) model.Result {
name := "KOCOWA"
hostname := "kocowa.com"
hostname := "www.kocowa.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/MetaAI.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// MetaAI
// www.meta.ai 双栈 且 get 请求 有问题
func MetaAI(c *http.Client) model.Result {
name := "MetaAI"
hostname := "meta.ai"
hostname := "www.meta.ai"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/ParamountPlus.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// ParamountPlus
// www.paramountplus.com 双栈 且 get 请求
func ParamountPlus(c *http.Client) model.Result {
name := "Paramount+"
hostname := "paramountplus.com"
hostname := "www.paramountplus.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/PrimeVideo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// PrimeVideo
// www.primevideo.com 仅 ipv4 且 get 请求
func PrimeVideo(c *http.Client) model.Result {
name := "Amazon Prime Video"
hostname := "primevideo.com"
hostname := "www.primevideo.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/SonyLiv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package transnation
import (
"encoding/json"
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// SonyLiv
// www.sonyliv.com 双栈 且 get 请求 - 有问题,获取不到地区
func SonyLiv(c *http.Client) model.Result {
name := "SonyLiv"
hostname := "sonyliv.com"
hostname := "www.sonyliv.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/Spotify.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package transnation
import (
"encoding/json"
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// Spotify
// spclient.wg.spotify.com 双栈 且 post 请求
func Spotify(c *http.Client) model.Result {
name := "Spotify Registration"
hostname := "spotify.com"
hostname := "spclient.wg.spotify.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/TVBAnywhere.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package transnation
import (
"encoding/json"
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// TVBAnywhere
// uapisfm.tvbanywhere.com.sg 仅 ipv4 且 get 请求
func TVBAnywhere(c *http.Client) model.Result {
name := "TVBAnywhere+"
hostname := "tvbanywhere.com.sg"
hostname := "uapisfm.tvbanywhere.com.sg"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/ViuCom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// ViuCom
// www.viu.com 仅 ipv4 且 get 请求
func ViuCom(c *http.Client) model.Result {
name := "Viu.com"
hostname := "viu.com"
hostname := "www.viu.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down
7 changes: 4 additions & 3 deletions transnation/YouTube.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package transnation

import (
"fmt"
"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
"io"
"net/http"
"strings"

"github.com/oneclickvirt/UnlockTests/model"
"github.com/oneclickvirt/UnlockTests/utils"
)

// Youtube
// www.youtube.com 双栈 且 get 请求
func Youtube(c *http.Client) model.Result {
name := "YouTube Region"
hostname := "youtube.com"
hostname := "www.youtube.com"
if c == nil {
return model.Result{Name: name}
}
Expand Down

0 comments on commit a9f7107

Please sign in to comment.