Skip to content

Instantly share code, notes, and snippets.

@ouyen
Last active February 19, 2024 17:15
Show Gist options
  • Save ouyen/08c7895dde30bc602d92f1a0d4f35c8c to your computer and use it in GitHub Desktop.
Save ouyen/08c7895dde30bc602d92f1a0d4f35c8c to your computer and use it in GitHub Desktop.
pkuvpn.sh
echo PASSWORD | openconnect --script-tun --script "ocproxy -D 7900 -g -k 15" --protocol=pulse vpn.pku.edu.cn -u 1900014514 --reconnect-timeout 60 --passwd-on-stdin
@Mickychen00
Copy link

Hi! Thanks a lot for this gist script.
But in recent days, I have found that it doesn't work. I didn't change anything. Are there something changed?

Got HTTP response: HTTP/1.1 302 Moved
GET https://vpnu.pku.edu.cn/dana-na/auth/url_izFvvX9SGEKBRRI9/welcome.cgi?p=failed
frmLogin
3 consecutive empty forms, aborting loop
Failed to complete authentication

@ouyen
Copy link
Author

ouyen commented Jan 29, 2024

change protocol from nc to pulse, and need to build openconnect form source code : work with v9.12, but failed with 8.20-1 ( ubuntu 22.04 apt)

@Mickychen00
Copy link

Does this solution work on MacOS? For me, I haven't ever tried to build tools like openconnect by myself before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment