matlab-proxy 0.13.1__py3-none-any.whl → 0.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of matlab-proxy might be problematic. Click here for more details.
- matlab_proxy/app.py +27 -2
- matlab_proxy/gui/asset-manifest.json +3 -3
- matlab_proxy/gui/index.html +1 -1
- matlab_proxy/gui/static/js/{main.0fcee5e5.js → main.14aa7840.js} +3 -3
- matlab_proxy/gui/static/js/main.14aa7840.js.map +1 -0
- matlab_proxy/util/mw.py +4 -4
- matlab_proxy/util/mwi/embedded_connector/request.py +2 -2
- {matlab_proxy-0.13.1.dist-info → matlab_proxy-0.14.0.dist-info}/METADATA +2 -1
- {matlab_proxy-0.13.1.dist-info → matlab_proxy-0.14.0.dist-info}/RECORD +14 -14
- {matlab_proxy-0.13.1.dist-info → matlab_proxy-0.14.0.dist-info}/WHEEL +1 -1
- matlab_proxy/gui/static/js/main.0fcee5e5.js.map +0 -1
- /matlab_proxy/gui/static/js/{main.0fcee5e5.js.LICENSE.txt → main.14aa7840.js.LICENSE.txt} +0 -0
- {matlab_proxy-0.13.1.dist-info → matlab_proxy-0.14.0.dist-info}/LICENSE.md +0 -0
- {matlab_proxy-0.13.1.dist-info → matlab_proxy-0.14.0.dist-info}/entry_points.txt +0 -0
- {matlab_proxy-0.13.1.dist-info → matlab_proxy-0.14.0.dist-info}/top_level.txt +0 -0
matlab_proxy/app.py
CHANGED
|
@@ -546,7 +546,9 @@ async def matlab_view(req):
|
|
|
546
546
|
await ws_server.prepare(req)
|
|
547
547
|
|
|
548
548
|
async with aiohttp.ClientSession(
|
|
549
|
-
|
|
549
|
+
trust_env=True,
|
|
550
|
+
cookies=req.cookies,
|
|
551
|
+
connector=aiohttp.TCPConnector(verify_ssl=False),
|
|
550
552
|
) as client_session:
|
|
551
553
|
try:
|
|
552
554
|
async with client_session.ws_connect(
|
|
@@ -610,6 +612,7 @@ async def matlab_view(req):
|
|
|
610
612
|
else:
|
|
611
613
|
# Proxy, injecting request header
|
|
612
614
|
async with aiohttp.ClientSession(
|
|
615
|
+
trust_env=True,
|
|
613
616
|
connector=aiohttp.TCPConnector(verify_ssl=False),
|
|
614
617
|
) as client_session:
|
|
615
618
|
try:
|
|
@@ -846,7 +849,29 @@ def create_app(config_name=matlab_proxy.get_default_config_name()):
|
|
|
846
849
|
return app
|
|
847
850
|
|
|
848
851
|
|
|
852
|
+
def configure_no_proxy_in_env():
|
|
853
|
+
"""Update the environment variable no_proxy to allow communication between processes on the local machine."""
|
|
854
|
+
import os
|
|
855
|
+
|
|
856
|
+
no_proxy_whitelist = ["0.0.0.0", "localhost", "127.0.0.1"]
|
|
857
|
+
|
|
858
|
+
no_proxy_env = os.environ.get("no_proxy")
|
|
859
|
+
if no_proxy_env is None:
|
|
860
|
+
os.environ["no_proxy"] = ",".join(no_proxy_whitelist)
|
|
861
|
+
else:
|
|
862
|
+
# Create set with leading and trailing whitespaces stripped
|
|
863
|
+
existing_no_proxy_env = [
|
|
864
|
+
val.lstrip().rstrip() for val in no_proxy_env.split(",")
|
|
865
|
+
]
|
|
866
|
+
os.environ["no_proxy"] = ",".join(
|
|
867
|
+
set(existing_no_proxy_env + no_proxy_whitelist)
|
|
868
|
+
)
|
|
869
|
+
logger.info(f"Setting no_proxy to: {os.environ.get('no_proxy')}")
|
|
870
|
+
|
|
871
|
+
|
|
849
872
|
def create_and_start_app(config_name):
|
|
873
|
+
configure_no_proxy_in_env()
|
|
874
|
+
|
|
850
875
|
# Create, configure and start the app.
|
|
851
876
|
app = create_app(config_name)
|
|
852
877
|
app = configure_and_start(app)
|
|
@@ -884,7 +909,7 @@ def print_version_and_exit():
|
|
|
884
909
|
"""prints the version of the package and exits"""
|
|
885
910
|
from importlib.metadata import version
|
|
886
911
|
|
|
887
|
-
matlab_proxy_version = version("
|
|
912
|
+
matlab_proxy_version = version(__name__.split(".")[0])
|
|
888
913
|
print(f"{matlab_proxy_version}")
|
|
889
914
|
sys.exit(0)
|
|
890
915
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.47712126.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.14aa7840.js",
|
|
5
5
|
"static/media/mathworks-pictograms.svg?20181009": "./static/media/mathworks-pictograms.f6f087b008b5a9435f26.svg",
|
|
6
6
|
"static/media/MATLAB-env-blur.png": "./static/media/MATLAB-env-blur.4fc94edbc82d3184e5cb.png",
|
|
7
7
|
"static/media/mathworks.svg?20181004": "./static/media/mathworks.80a3218e1ba29f0573fb.svg",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"static/media/gripper.svg": "./static/media/gripper.9defbc5e76d0de8bb6e0.svg",
|
|
36
36
|
"static/media/arrow.svg": "./static/media/arrow.0c2968b90bd9a64c8c3f.svg",
|
|
37
37
|
"main.47712126.css.map": "./static/css/main.47712126.css.map",
|
|
38
|
-
"main.
|
|
38
|
+
"main.14aa7840.js.map": "./static/js/main.14aa7840.js.map"
|
|
39
39
|
},
|
|
40
40
|
"entrypoints": [
|
|
41
41
|
"static/css/main.47712126.css",
|
|
42
|
-
"static/js/main.
|
|
42
|
+
"static/js/main.14aa7840.js"
|
|
43
43
|
]
|
|
44
44
|
}
|
matlab_proxy/gui/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MATLAB"/><meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER"/><link rel="manifest" href="./manifest.json"/><title>MATLAB</title><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MATLAB"/><meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER"/><link rel="manifest" href="./manifest.json"/><title>MATLAB</title><script defer="defer" src="./static/js/main.14aa7840.js"></script><link href="./static/css/main.47712126.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|