Git Product home page Git Product logo

Comments (3)

clyang avatar clyang commented on June 14, 2024

Oooops, 忘記還是有用IP連線的狀況, 會在下次release修正.
不過還是建議改用IP連線, 否則ptt換了IP還得再改code XD

(當然可以自己做domain lookup來比較IP, 只是太費工了, 歡迎送PR XD)

from welly.

yentzu-wang avatar yentzu-wang commented on June 14, 2024

研究了一下
140.112.172.1~140.112.171.5這五個ip都是連到ptt主站
140.112.172.11 -> ptt主站
140.112.172.12 -> ptt2

主站有那麼多備用ip應該是為了要讓旅外同胞可以用ip直連站台,
例如大陸防火牆有DNS污染的問題,ptt.cc這個DNS已經被大陸屏蔽了。

用domain lookup由ip反推是否為相同DNS是否可行?
ping ptt.cc -> get ip 140.112.172.1
ping 140.112.172.2 -> 得到的還是140.112.172.2
不確定這樣要怎麼查找,
若有方法論或可行的辦法的話再麻煩指點一下。

目前可以確定的是這些ip都在140.112.172.x的網段內,
把這部分判斷加個or條件寫死在程式內似乎是一個暫時可以解決的辦法,
但還是會有你上述說的問題,
ip改了程式也要跟著改

from welly.

yentzu-wang avatar yentzu-wang commented on June 14, 2024

此外目前if([[_site address] containsString:@"ptt.cc"])
這行判斷並沒有對大小寫作處理,
先不考慮極端情況例如 pTT.Cc
已正常的使用情境而言輸入PTT.CC是有可能的
這部分我先發個PR給你 #7

from welly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.