type
status
date
slug
tags
summary
category
password
icon

校园网→公网

我们的服务器都在北大校园网,可以直接连接北大校园网内的一切资源。如果你想访问网络,则需要在服务器上登录。linux上我们给出一个登录校园网的python脚本:需要校园网的用户名和密码。今后计算中心可能提供新方法。

公网→外网

  • 执行 wget -O config.yml https://s.suying666.info/link/lAMFcyqpHxkSbAdg?clash=1&log-level=info 下载 Clash 配置文件
  • 执行 mkdir clash && cd clash  在用户目录下创建 clash 文件夹。
  • 解压重命名为clash: gzip -d clash-linux-amd64-v1.18.0.gz && mv clash-linux-amd64-v1.18.0 clash
  • 执行 ./clash -d . 即可启动 Clash,同时启动 HTTP 代理和 Socks5 代理。
    • 如提示权限不足,请执行 chmod +x clash
    • 在执行过程中,会提示正在下载Country.mmdb文件,等待下载完成,使用Ctrl+C退出Clash程序,此时可以在目录~/.config/clash/下发现三个文件:cache.dbconfig.yamlCountry.mmdb。我们需要将我们准备好的config.yaml替换生成出来的config.yaml,这样就替换了Clash的配置文件。
  • 访问 Clash Dashboard 可以进行切换节点、测延迟等操作。Host: 127.0.0.1,端口: 9090
  • 以 Ubuntu 19.04 为例,打开系统设置,选择网络,点击网络代理右边的 ⚙ 按钮,选择手动,填写 HTTP 和 HTTPS 代理为 127.0.0.1:7890,填写 Socks 主机为 127.0.0.1:7891,即可启用系统代理。

ssh proxy

MacOS:

  1. 在你的clashX上查看proxy port:Settings/Settings/General/Proxy Port,通常是7890
  1. 安装squidman
  1. 打开squidman,在Settings/Preferences/general设置HTTP Port:7890,save
  1. 点击start squid
  1. 在vscode ssh config正常登陆的脚本下插入RemoteForward 3129 127.0.0.1:7890
  1. vim ~/.bashrc
7.source ~/.bashrc
 
  1. 要取消代理,您可以使用 unset 命令来取消之前设置的环境变量。具体操作如下:
执行以上命令后,之前设置的代理就会被取消。如果您是在脚本中设置的代理,确保在脚本执行完成后取消代理,以免影响其他应用的网络连接。如果是在shell中设置的代理,只要关闭当前的shell会话,代理设置也会消失。如果希望代理在所有会话和重启后都有效,就需要在像 ~/.bashrc~/.profile 这样的配置文件中设置,取消时也同样需要在这些文件中删除对应的设置。

Windows/linux

  1. 安装 Squid 作为proxy server. See http://www.squid-cache.org/. (Squid没有MacOS版本,MacOS用户可以安装Squidman
  1. 将/etc/squid/squid.conf (in Linux,in Windows, open squid.configuration, for Squidman, open Preference → template) 中的 http_access deny all 换成 http_access allow all
    1. notion image
  1. 对于Squidman,需要将Preference → General → Http_port设置为本地机代理端口(例如6.中的3128)。
  1. 如果你翻墙的代理服务器端口在7890,则你可以在squid的设置里加入。如果不翻墙就不用
    1. stop squid service, start squid service,让设置生效。
    1. 创建ssh隧道
      在服务器一侧
      1. Add the following entries to ~/.bashrc
        1. source ~/.bashrc or directly execute command
          检测联网是否成功
          FAQ
          1. What is 3129?
            1. 3129 is the server port. You can use any other port. However, don’t forget to set the environment variable http_proxy and https_proxy to the server port and the squid port to the laptop port.
          1. Error: Connection reset by peers.
            1. If you see a warning on the port when logging in, maybe the port you use has been used by other programs. Just change the port.
          重装显卡驱动Ubuntu创建用户
          GraphPKU
          GraphPKU
          北京大学张牧涵老师团队
          公告
          type
          status
          date
          slug
          tags
          summary
          category
          password
          icon
          组会排期:
          分享者1
          分享者2
          日期
          毛彦升
          杨昊桐
          2.21
          刘晔玮
          2.28
          王雨轩
          江凡
          3.7
          汤平之
          3.14
          何梓源
          3.21
          华羽宸
          孙一可
          4.11
          张雪峰
          4.18
          施沛廷
          马唯硕
          李自安
          胡逸
          亢世嘉
          王弈丁
          毛彦升
          张孝辉
          杨奇滨
          王彦博
          彭鑫港
          王希元
          徐宇飞
          孟繁续
          陈立斌
          吴青阳
          地点:资源西楼2202
          腾讯会议:694-682-1555
          线下午餐时间 12:00
          会议开始时间 12:30