Giter VIP home page Giter VIP logo

tsinghuatunet's Issues

使用非清华DNS时的解析问题

使用非清华DNS服务器且没有连接网关时,会无法解析 net.tsinghua.edu.cn 和 auth4.tsinghua.edu.cn,应当添加静态IP选项,但又不知道网关服务器的IP会不会经常改变。

支持 IPv6

现在 IPV6 还有小问题,但是由于宿舍没有 Tsinghua-IPv6 所以开发有些困难。分支 ipv6 存放着 beta 代码。

Webpage Encoding

The encoding webpage returned is "ISO-8859-1", but actually "GBK" should be used to decode it.

To the one who takes responsibility for the login webpage: "FUCK YOU!"

威联通NAS:Failed to establish a new connection: [Errno 101] Network is unreachable

使用威联通NAS通过SSH命令行联网出现了一些报错,已经配置好了python3环境及依赖包,求解。log如下:

[admin@NAS00B282-WDM 001]# python3 connect.py --test-first
22/10/04 13:21:14 954 [INFO,test_network:225] getting: http://github.com
22/10/04 13:21:14 965 [INFO,test_and_reconnent:247] not online, reconnecting... reason: HTTPConnectionPool(host='github.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7517d9d0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
22/10/04 13:21:14 966 [INFO,net_login:196] posting: http://net.tsinghua.edu.cn/do_login.php
22/10/04 13:21:14 972 [WARNING,net_login:202] error happened: HTTPConnectionPool(host='net.tsinghua.edu.cn', port=80): Max retries exceeded with url: /do_login.php (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7517ddf0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
[admin@NAS00B282-WDM 001]# python3 connect.py --connect-auth4
22/10/04 13:21:40 861 [ERROR,auth_login:134] get challenge failed:
Traceback (most recent call last):
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x750e1ac0>: Failed to establish a new connection: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='auth4.tsinghua.edu.cn', port=443): Max retries exceeded with url: /cgi-bin/get_challenge?callback=callback&username=$我的账号$&ip=&double_stack=1&
=1664860900849 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x750e1ac0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/share/CACHEDEV1_DATA/homes/admin/001/connect.py", line 126, in auth_login
g1=requests.get(url,headers=headers,params=params,timeout=TIMEOUT)
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/share/CACHEDEV1_DATA/.qpkg/Python3/python3/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='auth4.tsinghua.edu.cn', port=443): Max retries exceeded with url: /cgi-bin/get_challenge?callback=callback&username=$我的账号$&ip=&double_stack=1&_=1664860900849 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x750e1ac0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

ConnectionResetError

经常会报以下错误,似乎在清华校内都连不上清华的网,不知如何解决

./connect.py --connect
[INFO,net_login:37] posting: https://net.tsinghua.edu.cn/do_login.php
[WARNING,net_login:44] error happened: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

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.