Comments (7)
Possibly related:
https://serverfault.com/questions/771645/openconnect-cannot-connect-to-anyconnect-vpn-group-using-g
https://quickview.cloudapps.cisco.com/quickview/bug/CSCuc16678
I wonder if the <group-access> field has the wrong value if a port number is specified. If possible, try experimenting with v7.04 of the command-line openconnect client on Linux or OSX, as that will be easier than repeatedly modifying the library and rebuilding for Android.
from ics-openconnect.
Hi Kevin,
Given that the debugs on the ASA are lacking, I set up a MitM proxy to be able to see the traffic sent by OpenConnect on Android and I think the problem is this:
OpenConnect v7.08 running on Linux sends a POST request with:
Host: vpn.example.com:4443
and
<group-access>https://vpn.example.com:4443/GROUPNAME</group-access>
in the body of the POST.
OpenConnect running on Android sends:
Host: vpn.example.com
(i.e. no port), and:
<group-access>https://vpn.example.com/GROUPNAME</group-access>
(Again, no port.)
There is only one HTTP request made by OpenConnect, and it's immediately rejected by the ASA with that "Invalid host entry. Please re-enter" response.
Is OpenConnect for Android based on OpenConnect v7.04? If so, is it too difficult to make OpenConnect for Android use OpenConnect v7.08 as it seems to be working fine on that version? I can try to identify a commit that (possibly) fixed this behavior, if that helps.
Cheers!
from ics-openconnect.
Is OpenConnect for Android based on OpenConnect v7.04? If so, is it too difficult to make OpenConnect for Android use OpenConnect v7.08
Some additional work will be needed to use libopenconnect 7.08 on Android. It is on my TODO list but it isn't currently a high priority. It would be helpful to understand whether this issue is something that is fixed by upgrading from 7.04 to 7.08, or if it is something specific to Android on 7.04.
from ics-openconnect.
I am pretty sure this issue will be fixed with an upgrade to a more recent OpenConnect version...
For the "<group-access>" XML node, the non-standard port is appended to the URI in auth.c:xmlpost_initial_req():
buf_append(url_buf, "https://%s", vpninfo->hostname);
if (vpninfo->port != 443)
buf_append(url_buf, ":%d", vpninfo->port);
This part of the code was re-worked because it's different in v7.04:
if (vpninfo->urlpath)
result = asprintf(&url, "https://%s/%s", vpninfo->hostname, vpninfo->urlpath);
else
result = asprintf(&url, "https://%s", vpninfo->hostname);
(No non-standard port is appended.)
Same thing for the "Host:" HTTP header: In v7.08's cstp.c:start_cstp_connection() the code is:
if (vpninfo->port != 443)
buf_append(reqbuf, "Host: %s:%d\r\n", vpninfo->hostname, vpninfo->port);
else
buf_append(reqbuf, "Host: %s\r\n", vpninfo->hostname);
(i.e. non-standard port appended to the host.)
but in v7.04's cstp.c:start_cstp_connection() the code is simply:
buf_append(reqbuf, "Host: %s\r\n", vpninfo->hostname);
from ics-openconnect.
The master branch is now based on v7.08 + additional fixes. Can you retest?
Here's a debug APK, if needed:
https://storage.googleapis.com/cernekee-travis/ics-openconnect/OpenConnect-debug.apk
from ics-openconnect.
from ics-openconnect.
Closed per #23 (comment)
from ics-openconnect.
Related Issues (20)
- compile fail HOT 1
- OpenConnect Removed from play strore HOT 7
- openconnect not working android 10 HOT 3
- please help whenever I try to compile with nettle 3.4.1 and gnutls 3.6.8 HOT 1
- Can't build package missing using in Windows 10
- Update binary components with fixes for android 10 crash HOT 1
- Integration with Client
- App crash in all android version HOT 1
- import org.stoken.LibStoken not found HOT 1
- DNS!
- cannot connect to vpn server hosted by cisco vpn with error message "tls fatal alert has been received" HOT 3
- How can I get DTLSCompression and an DTLSCipher information HOT 6
- Error building make external HOT 1
- why is the project not developing? HOT 2
- library "libopenconnect.so" not found
- Openconnect APK 1119 does not work on Amazon Fire TV
- Hello This error occurs when we click on the server HOT 2
- apk download link? HOT 4
- undefined reference from libz.so and libm.so how to fix it help plz
- it does not work for android 12 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ics-openconnect.