Giter Club home page Giter Club logo

julia-notes's Introduction

Yu Zhai / Homepage / Twitter / GitHub / ORCID / Bilibili

I am Yu ZHAI. I am now a Boya Postdoctoral Research Fellow at College of Chemistry and Molecular Engineering, Peking University, China.

My job is related to the dynamics of molecules. Some software packages have been created by me and are open for use to the community. Please find them in my GitHub repos.

julia-notes's People

Contributors

zhaiyusci avatar

Stargazers

 avatar

Watchers

 avatar

julia-notes's Issues

Julia 用代理的问题

用 Julia 一个重要的痛点就是网络连接,例如很多单位和本单位一样有内外网问题。

自行配置 V2RayN。其他部分怎么弄,那是读者自己的事。注意以下要点。

  1. 注意调出来圈2处的HTTP监听端口(如果是新版,应该自动就有,旧版需要在系统托盘菜单里调一下)。libgit2 似乎不支持 socks 协议,故http的端口是必需的。

图片

  1. 以我图中的配置为例,打开Julia REPL,输入
ENV["https_proxy"]="http://127.0.0.1:10809/"

大部分系统这样就可以了。当然你可能不是 Windows + V2RayN的组合……

但是我只能跟你讲述我踩过的坑。我没踩过的,我说不出来。

WSL2 用户注意

图片

WSL2 环境可以被简单理解为虚拟机。如果你用的还是V2RayN,并且装在了Windows宿主机里,那么按照上图把圈2处的钩打上。然后去WSL环境,在自己的.bashrc里写

# add to bashrc
alias pjulia='https_proxy="http://$(cat /etc/resolv.conf | grep nameserver | awk "{ print \$2 }"):10809" julia'

当然请根据自己的端口情况改上面的10809

重新进入WSL环境,打开 pjulia,可以查看到ENV["https_proxy"]的值。简单来说,上面写在.bashrc里的咒语可以侦测宿主机的IP,然后从WSL里面访问外部的代理。

我衷心地期望本文是速朽的。一盼 Julia 官方提出更简单的方法,二盼某些技术不进步的单位不要搞内外网了,烦死了。


主要参考资料:

Julia connection to server behind proxy

WSL2 cannot access Windows proxy · Issue #4402 · microsoft/WSL

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.