mirror of
				https://github.com/yuezk/GlobalProtect-openconnect.git
				synced 2025-05-20 07:26:58 -04:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
			0188752c0a
			...
			54ccb761e5
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 54ccb761e5 | ||
|  | f72dbd1dec | ||
|  | 0814c3153a | ||
|  | 9f085e8b8c | 
							
								
								
									
										4
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -25,7 +25,7 @@ jobs: | ||||
|         id: set-matrix | ||||
|         run: | | ||||
|           if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then | ||||
|             echo 'matrix=[{"runner": "ubuntu-latest", "arch": "amd64"}, {"runner": "arm64", "arch": "arm64"]' >> $GITHUB_OUTPUT | ||||
|             echo 'matrix=[{"runner": "ubuntu-latest", "arch": "amd64"}, {"runner": "arm64", "arch": "arm64"}]' >> $GITHUB_OUTPUT | ||||
|           else | ||||
|             echo 'matrix=[{"runner": "ubuntu-latest", "arch": "amd64"}]' >> $GITHUB_OUTPUT | ||||
|           fi | ||||
| @@ -182,7 +182,7 @@ jobs: | ||||
|         gh -R "$REPO" release create $RELEASE_TAG \ | ||||
|           --title "$RELEASE_TAG" \ | ||||
|           --notes "$NOTES" \ | ||||
|           --target ${{ github.ref }} \ | ||||
|           ${{ github.ref == 'refs/heads/dev' && '--target dev' || '' }} \ | ||||
|           ${{ github.ref == 'refs/heads/dev' && '--prerelease' || '' }} \ | ||||
|           gh-release/artifact-source/* \ | ||||
|           gh-release/artifact-gpgui-*/* | ||||
|   | ||||
| @@ -366,17 +366,14 @@ fn read_auth_data_from_html(html: &str) -> Result<SamlAuthData, AuthDataParseErr | ||||
|     return Err(AuthDataParseError::Invalid); | ||||
|   } | ||||
|  | ||||
|   match SamlAuthData::from_html(html) { | ||||
|     Ok(auth_data) => Ok(auth_data), | ||||
|     Err(err) => { | ||||
|       if let Some(gpcallback) = extract_gpcallback(html) { | ||||
|         info!("Found gpcallback from html..."); | ||||
|         SamlAuthData::from_gpcallback(&gpcallback) | ||||
|       } else { | ||||
|         Err(err) | ||||
|       } | ||||
|   SamlAuthData::from_html(html).or_else(|err| { | ||||
|     if let Some(gpcallback) = extract_gpcallback(html) { | ||||
|       info!("Found gpcallback from html..."); | ||||
|       SamlAuthData::from_gpcallback(&gpcallback) | ||||
|     } else { | ||||
|       Err(err) | ||||
|     } | ||||
|   } | ||||
|   }) | ||||
| } | ||||
|  | ||||
| fn extract_gpcallback(html: &str) -> Option<String> { | ||||
|   | ||||
| @@ -32,7 +32,7 @@ pub(crate) struct ConnectArgs { | ||||
|   user: Option<String>, | ||||
|   #[arg(long, short, help = "The VPNC script to use")] | ||||
|   script: Option<String>, | ||||
|   #[arg(long, help = "Treat the server as a gateway, instead of a portal")] | ||||
|   #[arg(long, help = "Connect the server as a gateway, instead of a portal")] | ||||
|   as_gateway: bool, | ||||
|  | ||||
|   #[arg( | ||||
|   | ||||
| @@ -1,9 +1,10 @@ | ||||
| # Changelog | ||||
|  | ||||
| ## 2.1.3 - 2024-04-06 | ||||
| ## 2.1.3 - 2024-04-07 | ||||
|  | ||||
| - Support CAS authentication (fix [#339](https://github.com/yuezk/GlobalProtect-openconnect/issues/339)) | ||||
| - CLI: Add `--as-gateway` option to connect as gateway directly (fix [#318](https://github.com/yuezk/GlobalProtect-openconnect/issues/318)) | ||||
| - GUI: Support connect the gateway directly (fix [#318](https://github.com/yuezk/GlobalProtect-openconnect/issues/318)) | ||||
| - GUI: Add an option to use symbolic tray icon (fix [#341](https://github.com/yuezk/GlobalProtect-openconnect/issues/341)) | ||||
|  | ||||
| ## 2.1.2 - 2024-03-29 | ||||
|   | ||||
| @@ -162,7 +162,7 @@ pub enum Credential { | ||||
|   Password(PasswordCredential), | ||||
|   Prelogin(PreloginCredential), | ||||
|   AuthCookie(AuthCookieCredential), | ||||
|   CachedCredential(CachedCredential), | ||||
|   Cached(CachedCredential), | ||||
| } | ||||
|  | ||||
| impl Credential { | ||||
| @@ -179,7 +179,7 @@ impl Credential { | ||||
|       Credential::Password(cred) => cred.username(), | ||||
|       Credential::Prelogin(cred) => cred.username(), | ||||
|       Credential::AuthCookie(cred) => cred.username(), | ||||
|       Credential::CachedCredential(cred) => cred.username(), | ||||
|       Credential::Cached(cred) => cred.username(), | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -197,7 +197,7 @@ impl Credential { | ||||
|         Some(cred.prelogon_user_auth_cookie()), | ||||
|         None, | ||||
|       ), | ||||
|       Credential::CachedCredential(cred) => ( | ||||
|       Credential::Cached(cred) => ( | ||||
|         cred.password(), | ||||
|         None, | ||||
|         Some(cred.auth_cookie.user_auth_cookie()), | ||||
| @@ -244,6 +244,6 @@ impl From<&AuthCookieCredential> for Credential { | ||||
|  | ||||
| impl From<&CachedCredential> for Credential { | ||||
|   fn from(value: &CachedCredential) -> Self { | ||||
|     Self::CachedCredential(value.clone()) | ||||
|     Self::Cached(value.clone()) | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -130,13 +130,15 @@ pub struct GpParamsBuilder { | ||||
|  | ||||
| impl GpParamsBuilder { | ||||
|   pub fn new() -> Self { | ||||
|     let computer = whoami::fallible::hostname().unwrap_or_else(|_| String::from("localhost")); | ||||
|  | ||||
|     Self { | ||||
|       is_gateway: false, | ||||
|       user_agent: GP_USER_AGENT.to_string(), | ||||
|       client_os: ClientOs::Linux, | ||||
|       os_version: Default::default(), | ||||
|       client_version: Default::default(), | ||||
|       computer: whoami::hostname(), | ||||
|       computer, | ||||
|       ignore_tls_errors: false, | ||||
|     } | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user