Giter VIP home page Giter VIP logo

Comments (15)

Eugeny avatar Eugeny commented on May 25, 2024 1

I'll take a look at why the frontend build isn't working on Windows later, but for now you can just build the frontend in WSL and the rest natively

from warpgate.

Eugeny avatar Eugeny commented on May 25, 2024 1

https://github.com/warp-tech/warpgate/wiki/Getting-started#setup

The .exe will be in the target/debug (target/release if you built with --release)

On Windows, you'll need to set an explicit config path with --config

Please keep in mind that I haven't tested it on Windows yet, so even though it should just work, there might be issues ✌️

from warpgate.

Eugeny avatar Eugeny commented on May 25, 2024 1

If you build on WSL, it'll build a Linux binary which you can just use normally as per guide with no Windows gotchas.

To get an .exe, you need to build on Windows.

from warpgate.

Eugeny avatar Eugeny commented on May 25, 2024

Did you install the dependencies with just yarn? Just rechecked to make sure it works for me and it does (macOS, Node v21).

You can try upgrading vite to see if that resolves the issue, in case it's platform dependent.

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

Yes, I ran the just yarn command before running just yarn build command. I updated Vite to the latest version and that fixed that error, but I'm still getting other errors:
[vite:html-inline-proxy] Could not load D:Rustwarpgatewarpgate-websrcadminindex.html?html-proxy&inline-css&index=0.css (imported by src/admin/index.html): No matching HTML proxy module found from D:Rustwarpgatewarpgate-websrcadminindex.html?html-proxy&inline-css&index=0.css error during build: Error: Could not load D:Rustwarpgatewarpgate-websrcadminindex.html?html-proxy&inline-css&index=0.css (imported by src/admin/index.html): No matching HTML proxy module found from D:Rustwarpgatewarpgate-websrcadminindex.html?html-proxy&inline-css&index=0.css at Object.load (file:///D:/Rust/warpgate/warpgate-web/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38727:27) at file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:18670:40 at async PluginDriver.hookFirstAndGetPlugin (file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:18570:28) at async file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:17740:33 at async Queue.work (file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:18780:32)

After checking in the htmlInlineProxyPlugin function, I see that url doesn't match the htmlProxyMap.get(config), which is causing the error above.
function htmlInlineProxyPlugin(config) { htmlProxyMap.set(config, new Map()); return { name: 'vite:html-inline-proxy', resolveId(id) { if (htmlProxyRE$1.test(id)) { return id; } }, load(id) { const proxyMatch = id.match(htmlProxyRE$1); if (proxyMatch) { const index = Number(proxyMatch[1]); const file = cleanUrl(id); const url = file.replace(normalizePath$3(config.root), ''); const result = htmlProxyMap.get(config).get(url)?.[index]; if (result) { return result; } else { throw new Error(No matching HTML proxy module found from ${id}); } } }, }; }

url value: D:Rustwarpgatewarpgate-websrcadminindex.html
htmlProxyMap.get(config) value: Map(2) { 'D:\\Rust\\warpgate\\warpgate-web\\src\\admin\\index.html' => [ { code: '#app { display: none }' } ], 'D:\\Rust\\warpgate\\warpgate-web\\src\\gateway\\index.html' => [ { code: '#app { display: none }' } ] }

Although I assigned the url value to D:\Rust\warpgate\warpgate-web\src\admin\index.html to bypass the current error, I still received other errors:
[vite]: Rollup failed to resolve import "gateway/lib/api" from "D:\Rust\warpgate\warpgate-web\src\embed\index.ts". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.external error during build: Error: [vite]: Rollup failed to resolve import "gateway/lib/api" from "D:\Rust\warpgate\warpgate-web\src\embed\index.ts". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.external at viteWarn (file:///D:/Rust/warpgate/warpgate-web/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:67321:27) at onRollupWarning (file:///D:/Rust/warpgate/warpgate-web/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:67349:9) at onwarn (file:///D:/Rust/warpgate/warpgate-web/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:67066:13) at file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:17398:13 at Object.logger [as onLog] (file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:19056:9) at ModuleLoader.handleInvalidResolvedId (file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:18002:26) at file:///D:/Rust/warpgate/warpgate-web/node_modules/rollup/dist/es/shared/node-entry.js:17960:26

I'm not sure but i think it's not suitable to build Warpgate on Windows.

from warpgate.

Eugeny avatar Eugeny commented on May 25, 2024

Hmm I can't test it on Windows right now but you could give WSL a try and see if it behaves differently

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

Yes, I have tried on WSL and everything is running fine. However, how do I run my application?

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

How do i run my Warpgate application after ran cargo build successfully?

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

No, I'm building Warpgate on WSL

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

Is the .exe file the Warpgate file in the target/debug directory?

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

Can I run my Warpgate application under local http instead of https, because I see that Wargate will run by default through https:
Accepting HTTP connections on https://0.0.0.0:8888

from warpgate.

Eugeny avatar Eugeny commented on May 25, 2024

No, insecure HTTP is not supported

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

So, is there no way to test it at the local before deploy to Dev/Pro server?

from warpgate.

Eugeny avatar Eugeny commented on May 25, 2024

Why not? Just do it. Warpgate automatically generates a self-signed certificate.

from warpgate.

habin201291 avatar habin201291 commented on May 25, 2024

Yes, I built a Warpgate installation file and ran it locally through Ngrok. I am trying SSH connection but I got an error:
C:\Users\Welcome>ssh "habin:vm1@localhost" -p 2222
habin:vm1@localhost's password:
Warpgate Selected target: vm1
Warpgate Host key (ssh-ed25519): AAAAC3NzaC1lZDI1NTE5AAAAIL+Veqk20cPbOmT4QUE1SoC3fxhDmMuJT24girbCIvmh
Warpgate There is no trusted ssh-ed25519 key for this host.
Warpgate Trust this key? (y/n)
channel_by_id: 0: bad id: channel free
Disconnecting 127.0.0.1 port 2222: oclose packet referred to nonexistent channel 0

My warpgate.yaml:
sso_providers: []
external_proxy_header:
host: "host"
proto: "x-forwarded-proto"
recordings:
enable: true
path: /var/lib/warpgate/recordings
external_host: localhost:8888
database_url: "sqlite:/var/lib/warpgate/db"
ssh:
enable: true
listen: "0.0.0.0:2222"
keys: /var/lib/warpgate/ssh-keys
host_key_verification: prompt
http:
enable: true
listen: "0.0.0.0:8888"
certificate: /var/lib/warpgate/tls.certificate.pem
key: /var/lib/warpgate/tls.key.pem
trust_x_forwarded_headers: false
session_max_age: 30m
cookie_max_age: 1day
mysql:
enable: true
listen: "0.0.0.0:33306"
certificate: /var/lib/warpgate/tls.certificate.pem
key: /var/lib/warpgate/tls.key.pem
log:
retention: 7days
send_to: ~
config_provider: database

I have another question. Can I run Warpgate without building an installation file? I am trying to develop the SSH connection function as follows:
Currently, after running the ssh... command on the terminal, we will receive a link on the terminal to login to Warpgate. I want that link to be sent to a Realtime experience infrastructure like Ably, Is it possible? If so, where should I process it? Because at the moment, I have not identified where the function of returning the path on the terminal after running the ssh command is executed.

from warpgate.

Related Issues (20)

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.