Compare commits
No commits in common. "main" and "web" have entirely different histories.
30
.github/workflows/ci_arch.yml
vendored
@ -1,30 +0,0 @@
|
|||||||
name: CI (Arch Linux)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: archlinux:latest
|
|
||||||
env:
|
|
||||||
CGO_ENABLED: "0"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pacman -Sy --noconfirm git base-devel go
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.22'
|
|
||||||
- name: Build
|
|
||||||
run: go build ./...
|
|
||||||
- name: Test
|
|
||||||
run: go test ./... -v
|
|
||||||
- name: Lint
|
|
||||||
run: go vet ./...
|
|
||||||
13
.gitignore
vendored
@ -1,13 +1,4 @@
|
|||||||
# Binaries
|
|
||||||
benzcloud-client
|
benzcloud-client
|
||||||
benzcloud-client.exe
|
benzcloud-client.exe
|
||||||
*.exe
|
android/
|
||||||
*.test
|
data/
|
||||||
*.prof
|
|
||||||
|
|
||||||
# Data & Builds
|
|
||||||
benzcloud-client-data/
|
|
||||||
android/build/
|
|
||||||
android/gen/
|
|
||||||
android/bin/
|
|
||||||
android/compiled_res/
|
|
||||||
|
|||||||
17
404.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>404 - Seite nicht gefunden · BenzCloud Client</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body style="display: flex; justify-content: center; align-items: center; text-align: center; height: 100vh;">
|
||||||
|
<div style="max-width: 500px; padding: 2rem;">
|
||||||
|
<h1 style="font-size: 4rem; color: var(--accent-primary); margin-bottom: 1rem;">404</h1>
|
||||||
|
<h2 style="margin-bottom: 1rem;">Seite nicht gefunden / Page Not Found</h2>
|
||||||
|
<p style="color: var(--text-secondary); margin-bottom: 2rem;">Die angeforderte Ressource existiert nicht auf diesem Client.</p>
|
||||||
|
<a href="index.html" class="btn-primary" style="display: inline-block;">Zur Startseite</a>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
674
LICENSE
@ -1,674 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
46
README.md
@ -1,46 +0,0 @@
|
|||||||
# 📱 BenzCloud Client
|
|
||||||
|
|
||||||
> **Notice:** BenzCloud Client is in **active development / pre-release status** (`v1.0`).
|
|
||||||
|
|
||||||
BenzCloud Client is the cross-platform client companion for the BenzCloud enterprise suite. It connects devices to the secure Slack Nebula Mesh-VPN overlay and built-in Custom DNS server, offering single-click access to all enterprise services (Drive, Mail, Chat, and custom websites).
|
|
||||||
|
|
||||||
## ✨ Features
|
|
||||||
|
|
||||||
- **Instant Zero-Config Pairing:** Connects initially to the BenzCloud Server LAN IP (e.g. `http://192.168.0.5:8080`), automatically downloads signed Nebula certificates and configuration, and transitions all traffic into the encrypted P2P mesh network.
|
|
||||||
- **Service Launcher Dashboard:** Fast access to:
|
|
||||||
- 📁 **BenzCloud Drive** (`http://drive.<domain>`)
|
|
||||||
- 📧 **BenzCloud Mail** (`http://mail.<domain>`)
|
|
||||||
- 💬 **BenzCloud Chat** (`http://chat.<domain>`)
|
|
||||||
- 🌐 **Websites & Portals** (`http://<domain>`)
|
|
||||||
- **Immutable Privileges:** Fully integrates with the server's guarantee that Mesh-VPN and DNS connectivity are permanently active for all accounts.
|
|
||||||
- **Multi-Platform:** Builds for Linux (WebKitGTK desktop shell), Windows (App-Mode executable), and native Android APK.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 Installation & Usage
|
|
||||||
|
|
||||||
### Linux (x86_64)
|
|
||||||
```bash
|
|
||||||
# Launch client desktop GUI
|
|
||||||
./benzcloud-client
|
|
||||||
|
|
||||||
# Or pair via command line
|
|
||||||
./benzcloud-client -server http://192.168.0.5:8080 -user admin -pass YourPassword
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows (x86_64)
|
|
||||||
Launch `benzcloud-client.exe` to connect and browse your local enterprise cloud.
|
|
||||||
|
|
||||||
### Android
|
|
||||||
Install `benzcloud-client-v1.0.apk` for mobile access to your files, email, and chats.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 👥 Authors & Credits
|
|
||||||
- **Jeremy Benz** ([@benzjeremy](https://github.com/benzjeremy)) – Lead Engineer & Project Creator
|
|
||||||
- Pair-programmed with AI Assistant (Google Antigravity)
|
|
||||||
- © 2026 Jeremy Benz
|
|
||||||
|
|
||||||
## 📄 License & Third-Party Notices
|
|
||||||
- **Main Project:** Released under the [GNU General Public License v3.0 (GPL-3.0)](LICENSE).
|
|
||||||
- **Slack Nebula:** Mesh-VPN networking is powered by Slack Nebula, licensed under the [MIT License](https://github.com/slackhq/nebula/blob/master/LICENSE).
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
package="com.benzjeremy.benzcloud.client"
|
|
||||||
android:versionCode="1"
|
|
||||||
android:versionName="1.0">
|
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="34" />
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:allowBackup="false"
|
|
||||||
android:label="BenzCloud Client"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
|
||||||
android:theme="@style/AppTheme"
|
|
||||||
android:networkSecurityConfig="@xml/network_security_config">
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:exported="true"
|
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
||||||
|
Before Width: | Height: | Size: 52 KiB |
@ -1,49 +0,0 @@
|
|||||||
package com.benzjeremy.benzcloud.client;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.webkit.WebSettings;
|
|
||||||
import android.webkit.WebView;
|
|
||||||
import android.webkit.WebViewClient;
|
|
||||||
|
|
||||||
public class MainActivity extends Activity {
|
|
||||||
private WebView webView;
|
|
||||||
|
|
||||||
public static class AppWebViewClient extends WebViewClient {
|
|
||||||
@Override
|
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
||||||
view.loadUrl(url);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_main);
|
|
||||||
|
|
||||||
webView = (WebView) findViewById(R.id.webView);
|
|
||||||
WebSettings settings = webView.getSettings();
|
|
||||||
settings.setJavaScriptEnabled(true);
|
|
||||||
settings.setDomStorageEnabled(true);
|
|
||||||
settings.setDatabaseEnabled(true);
|
|
||||||
settings.setAllowFileAccess(true);
|
|
||||||
settings.setAllowContentAccess(true);
|
|
||||||
settings.setAllowFileAccessFromFileURLs(true);
|
|
||||||
settings.setAllowUniversalAccessFromFileURLs(true);
|
|
||||||
|
|
||||||
webView.setWebViewClient(new AppWebViewClient());
|
|
||||||
|
|
||||||
// Load bundled offline client dashboard & pairing wizard
|
|
||||||
webView.loadUrl("file:///android_asset/index.html");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed() {
|
|
||||||
if (webView != null && webView.canGoBack()) {
|
|
||||||
webView.goBack();
|
|
||||||
} else {
|
|
||||||
super.onBackPressed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 53 KiB |
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@color/bg_page">
|
|
||||||
|
|
||||||
<WebView
|
|
||||||
android:id="@+id/webView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 19 KiB |
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="bg_page">#0A0E17</color>
|
|
||||||
<color name="bg_surface">#121826</color>
|
|
||||||
<color name="accent_blue">#38BDF8</color>
|
|
||||||
<color name="text_main">#F1F5F9</color>
|
|
||||||
</resources>
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<string name="app_name">BenzCloud Client</string>
|
|
||||||
<string name="client_connected">Mit BenzCloud verbunden</string>
|
|
||||||
</resources>
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<style name="AppTheme" parent="android:Theme.Material.NoActionBar">
|
|
||||||
<item name="android:windowBackground">@color/bg_page</item>
|
|
||||||
<item name="android:colorPrimary">@color/bg_surface</item>
|
|
||||||
<item name="android:colorAccent">@color/accent_blue</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<network-security-config>
|
|
||||||
<base-config cleartextTrafficPermitted="true" />
|
|
||||||
</network-security-config>
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
WORK="$DIR/build"
|
|
||||||
SDK="/home/benzj/Android/Sdk"
|
|
||||||
BUILD_TOOLS="$SDK/build-tools/34.0.0"
|
|
||||||
ANDROID_JAR="$SDK/platforms/android-34/android.jar"
|
|
||||||
KEYSTORE="/home/benzj/Projekte/benzjeremy.github.io/myfdroid/myfdroid.keystore"
|
|
||||||
KEYPASS="myfdroid_secret_key_2026"
|
|
||||||
|
|
||||||
rm -rf "$WORK"
|
|
||||||
mkdir -p "$WORK/bin" "$WORK/gen" "$WORK/compiled_res"
|
|
||||||
|
|
||||||
echo "==> 1. Compiling resources with aapt2..."
|
|
||||||
"$BUILD_TOOLS/aapt2" compile --dir "$DIR/app/src/main/res" -o "$WORK/compiled_res.zip"
|
|
||||||
|
|
||||||
echo "==> 2. Linking resources and generating R.java..."
|
|
||||||
"$BUILD_TOOLS/aapt2" link \
|
|
||||||
-I "$ANDROID_JAR" \
|
|
||||||
--manifest "$DIR/app/src/main/AndroidManifest.xml" \
|
|
||||||
--java "$WORK/gen" \
|
|
||||||
-A "$DIR/app/src/main/assets" \
|
|
||||||
-o "$WORK/unaligned.apk" \
|
|
||||||
--auto-add-overlay \
|
|
||||||
"$WORK/compiled_res.zip"
|
|
||||||
|
|
||||||
echo "==> 3. Compiling Java sources..."
|
|
||||||
find "$DIR/app/src/main/java" "$WORK/gen" -name "*.java" > "$WORK/sources.txt"
|
|
||||||
javac --release 8 -cp "$ANDROID_JAR" -d "$WORK/bin" @"$WORK/sources.txt"
|
|
||||||
|
|
||||||
echo "==> 4. Converting bytecode to DEX with d8..."
|
|
||||||
find "$WORK/bin" -name "*.class" > "$WORK/classes.txt"
|
|
||||||
"$BUILD_TOOLS/d8" --output "$WORK" --lib "$ANDROID_JAR" @"$WORK/classes.txt"
|
|
||||||
|
|
||||||
echo "==> 5. Adding classes.dex to APK..."
|
|
||||||
cd "$WORK"
|
|
||||||
python3 -c "import zipfile; z = zipfile.ZipFile('unaligned.apk', 'a'); z.write('classes.dex', 'classes.dex'); z.close()"
|
|
||||||
cd "$DIR"
|
|
||||||
|
|
||||||
echo "==> 6. Aligning APK with zipalign..."
|
|
||||||
"$BUILD_TOOLS/zipalign" -p -f 4 "$WORK/unaligned.apk" "$WORK/aligned.apk"
|
|
||||||
|
|
||||||
echo "==> 7. Signing APK with apksigner..."
|
|
||||||
"$BUILD_TOOLS/apksigner" sign \
|
|
||||||
--ks "$KEYSTORE" \
|
|
||||||
--ks-pass "pass:$KEYPASS" \
|
|
||||||
--key-pass "pass:$KEYPASS" \
|
|
||||||
--out "$DIR/benzcloud-client-v1.0.apk" \
|
|
||||||
"$WORK/aligned.apk"
|
|
||||||
|
|
||||||
echo "==> 8. Verifying APK signature..."
|
|
||||||
"$BUILD_TOOLS/apksigner" verify --verbose "$DIR/benzcloud-client-v1.0.apk"
|
|
||||||
|
|
||||||
echo "✅ SUCCESS! Native BenzCloud Client APK built at: $DIR/benzcloud-client-v1.0.apk"
|
|
||||||
@ -73,30 +73,9 @@ function applyLanguage(lang) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function fetchClientProfile() {
|
async function fetchClientProfile() {
|
||||||
if (window.location.protocol === "file:") {
|
|
||||||
const stored = localStorage.getItem("benzcloud_profile");
|
|
||||||
if (stored) {
|
|
||||||
try {
|
|
||||||
clientProfile = JSON.parse(stored);
|
|
||||||
showConnectedView(clientProfile);
|
|
||||||
return;
|
|
||||||
} catch (e) {
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
showPairingView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch("/api/profile");
|
const res = await fetch("/api/profile");
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const stored = localStorage.getItem("benzcloud_profile");
|
|
||||||
if (stored) {
|
|
||||||
clientProfile = JSON.parse(stored);
|
|
||||||
showConnectedView(clientProfile);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
showPairingView();
|
showPairingView();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -108,16 +87,6 @@ async function fetchClientProfile() {
|
|||||||
clientProfile = data;
|
clientProfile = data;
|
||||||
showConnectedView(data);
|
showConnectedView(data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const stored = localStorage.getItem("benzcloud_profile");
|
|
||||||
if (stored) {
|
|
||||||
try {
|
|
||||||
clientProfile = JSON.parse(stored);
|
|
||||||
showConnectedView(clientProfile);
|
|
||||||
return;
|
|
||||||
} catch (e) {
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
showPairingView();
|
showPairingView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,84 +105,29 @@ function showConnectedView(data) {
|
|||||||
document.getElementById("dispLighthouse").textContent = data.server_vpn_ip || "10.42.0.1";
|
document.getElementById("dispLighthouse").textContent = data.server_vpn_ip || "10.42.0.1";
|
||||||
|
|
||||||
const domain = data.base_domain;
|
const domain = data.base_domain;
|
||||||
if (data.server_url) {
|
document.getElementById("subDrive").textContent = `http://drive.${domain}`;
|
||||||
document.getElementById("subDrive").textContent = `${data.server_url}/#drive`;
|
document.getElementById("cardDrive").href = `http://drive.${domain}`;
|
||||||
document.getElementById("cardDrive").href = `${data.server_url}/#drive`;
|
|
||||||
|
|
||||||
document.getElementById("subMail").textContent = `${data.server_url}/#mail`;
|
document.getElementById("subMail").textContent = `http://mail.${domain}`;
|
||||||
document.getElementById("cardMail").href = `${data.server_url}/#mail`;
|
document.getElementById("cardMail").href = `http://mail.${domain}`;
|
||||||
|
|
||||||
document.getElementById("subChat").textContent = `${data.server_url}/#chat`;
|
document.getElementById("subChat").textContent = `http://chat.${domain}`;
|
||||||
document.getElementById("cardChat").href = `${data.server_url}/#chat`;
|
document.getElementById("cardChat").href = `http://chat.${domain}`;
|
||||||
|
|
||||||
document.getElementById("subWeb").textContent = data.server_url;
|
document.getElementById("subWeb").textContent = `http://${domain}`;
|
||||||
document.getElementById("cardWeb").href = data.server_url;
|
document.getElementById("cardWeb").href = `http://${domain}`;
|
||||||
} else {
|
|
||||||
document.getElementById("subDrive").textContent = `http://drive.${domain}`;
|
|
||||||
document.getElementById("cardDrive").href = `http://drive.${domain}`;
|
|
||||||
|
|
||||||
document.getElementById("subMail").textContent = `http://mail.${domain}`;
|
|
||||||
document.getElementById("cardMail").href = `http://mail.${domain}`;
|
|
||||||
|
|
||||||
document.getElementById("subChat").textContent = `http://chat.${domain}`;
|
|
||||||
document.getElementById("cardChat").href = `http://chat.${domain}`;
|
|
||||||
|
|
||||||
document.getElementById("subWeb").textContent = `http://${domain}`;
|
|
||||||
document.getElementById("cardWeb").href = `http://${domain}`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submitPairing(e) {
|
async function submitPairing(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let serverUrl = document.getElementById("serverUrl").value.trim();
|
const serverUrl = document.getElementById("serverUrl").value.trim();
|
||||||
const username = document.getElementById("pairUser").value.trim();
|
const username = document.getElementById("pairUser").value.trim();
|
||||||
const password = document.getElementById("pairPass").value;
|
const password = document.getElementById("pairPass").value;
|
||||||
|
|
||||||
if (!serverUrl.startsWith("http://") && !serverUrl.startsWith("https://")) {
|
|
||||||
serverUrl = "http://" + serverUrl;
|
|
||||||
}
|
|
||||||
serverUrl = serverUrl.replace(/\/+$/, "");
|
|
||||||
|
|
||||||
const btn = document.getElementById("btnPair");
|
const btn = document.getElementById("btnPair");
|
||||||
btn.disabled = true;
|
btn.disabled = true;
|
||||||
btn.textContent = i18n[currentLang].pairing_in_progress;
|
btn.textContent = i18n[currentLang].pairing_in_progress;
|
||||||
|
|
||||||
if (window.location.protocol === "file:") {
|
|
||||||
try {
|
|
||||||
const res = await fetch(`${serverUrl}/api/pair`, {
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({ username, password })
|
|
||||||
});
|
|
||||||
const data = await res.json();
|
|
||||||
if (!res.ok) {
|
|
||||||
alert((currentLang === "de" ? "Kopplung fehlgeschlagen: " : "Pairing failed: ") + (data.error || "Serverfehler"));
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const prof = {
|
|
||||||
paired: true,
|
|
||||||
server_url: serverUrl,
|
|
||||||
username: data.username || username,
|
|
||||||
base_domain: data.base_domain || "intern",
|
|
||||||
overlay_ip: data.overlay_ip || "10.42.0.2",
|
|
||||||
server_vpn_ip: data.server_vpn_ip || "10.42.0.1",
|
|
||||||
session_token: data.session_token
|
|
||||||
};
|
|
||||||
localStorage.setItem("benzcloud_profile", JSON.stringify(prof));
|
|
||||||
clientProfile = prof;
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
showConnectedView(prof);
|
|
||||||
} catch (err) {
|
|
||||||
alert((currentLang === "de" ? "Netzwerkfehler: " : "Network error: ") + err);
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch("/api/pair", {
|
const res = await fetch("/api/pair", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@ -222,14 +136,14 @@ async function submitPairing(e) {
|
|||||||
});
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
alert((currentLang === "de" ? "Kopplung fehlgeschlagen: " : "Pairing failed: ") + (data.error || "Serverfehler"));
|
alert("Kopplung fehlgeschlagen: " + (data.error || "Serverfehler"));
|
||||||
btn.disabled = false;
|
btn.disabled = false;
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
btn.textContent = i18n[currentLang].btn_pair;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fetchClientProfile();
|
fetchClientProfile();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert((currentLang === "de" ? "Netzwerkfehler: " : "Network error: ") + err);
|
alert("Netzwerkfehler: " + err);
|
||||||
btn.disabled = false;
|
btn.disabled = false;
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
btn.textContent = i18n[currentLang].btn_pair;
|
||||||
}
|
}
|
||||||
@ -237,18 +151,10 @@ async function submitPairing(e) {
|
|||||||
|
|
||||||
async function unpairClient() {
|
async function unpairClient() {
|
||||||
if (!confirm(i18n[currentLang].confirm_unpair)) return;
|
if (!confirm(i18n[currentLang].confirm_unpair)) return;
|
||||||
if (window.location.protocol === "file:") {
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
clientProfile = null;
|
|
||||||
showPairingView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
await fetch("/api/unpair", { method: "POST" });
|
await fetch("/api/unpair", { method: "POST" });
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
fetchClientProfile();
|
fetchClientProfile();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
localStorage.removeItem("benzcloud_profile");
|
alert("Fehler beim Entkoppeln");
|
||||||
showPairingView();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +0,0 @@
|
|||||||
# CI Report
|
|
||||||
|
|
||||||
Commit: ece1995ffb9d9fd3a88447b69409b4db8128b35b
|
|
||||||
|
|
||||||
Standardisierte CI-Pipeline vorhanden.
|
|
||||||
4
favicon.svg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
|
||||||
|
<rect width="32" height="32" rx="8" fill="#0e121b"/>
|
||||||
|
<path d="M4 6h24v14H4V6zm0 16h24v2H4v-2zm8 3h8v1h-8v-1z" fill="#38bdf8"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 211 B |
166
gui_linux.go
@ -1,166 +0,0 @@
|
|||||||
//go:build linux && cgo
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
/*
|
|
||||||
#cgo pkg-config: gtk+-3.0 webkit2gtk-4.1
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <webkit2/webkit2.h>
|
|
||||||
|
|
||||||
static int check_display() {
|
|
||||||
int argc = 0;
|
|
||||||
char **argv = NULL;
|
|
||||||
return gtk_init_check(&argc, &argv) ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void on_window_destroy(GtkWidget *widget, gpointer data) {
|
|
||||||
gtk_main_quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean on_context_menu(WebKitWebView *web_view, WebKitContextMenu *context_menu, GdkEvent *event, WebKitHitTestResult *hit_test_result, gpointer user_data) {
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void set_window_icon_from_memory(GtkWindow *window, const void *buf, gsize len) {
|
|
||||||
if (!buf || len == 0) return;
|
|
||||||
GError *err = NULL;
|
|
||||||
GdkPixbufLoader *loader = gdk_pixbuf_loader_new();
|
|
||||||
if (loader) {
|
|
||||||
if (gdk_pixbuf_loader_write(loader, (const guint8 *)buf, len, &err)) {
|
|
||||||
gdk_pixbuf_loader_close(loader, &err);
|
|
||||||
GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
|
|
||||||
if (pixbuf) {
|
|
||||||
gtk_window_set_icon(window, pixbuf);
|
|
||||||
gtk_window_set_default_icon(pixbuf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
g_object_unref(loader);
|
|
||||||
}
|
|
||||||
gtk_window_set_default_icon_name("benzcloud-client");
|
|
||||||
gtk_window_set_icon_name(window, "benzcloud-client");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void activate_gtk_app(const char* title, const char* url, int width, int height, const void *icon_buf, int icon_len) {
|
|
||||||
int argc = 0;
|
|
||||||
char **argv = NULL;
|
|
||||||
if (!gtk_init_check(&argc, &argv)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_set_prgname("benzcloud-client");
|
|
||||||
g_set_application_name("BenzCloud Client");
|
|
||||||
|
|
||||||
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title(GTK_WINDOW(window), title);
|
|
||||||
gtk_window_set_default_size(GTK_WINDOW(window), width, height);
|
|
||||||
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
|
|
||||||
|
|
||||||
if (icon_buf && icon_len > 0) {
|
|
||||||
set_window_icon_from_memory(GTK_WINDOW(window), icon_buf, (gsize)icon_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
GdkRGBA bg_color;
|
|
||||||
gdk_rgba_parse(&bg_color, "#0b0f19");
|
|
||||||
|
|
||||||
WebKitSettings *settings = webkit_settings_new();
|
|
||||||
webkit_settings_set_enable_developer_extras(settings, FALSE);
|
|
||||||
webkit_settings_set_hardware_acceleration_policy(settings, WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS);
|
|
||||||
|
|
||||||
GtkWidget *web_view = webkit_web_view_new_with_settings(settings);
|
|
||||||
webkit_web_view_set_background_color(WEBKIT_WEB_VIEW(web_view), &bg_color);
|
|
||||||
g_signal_connect(web_view, "context-menu", G_CALLBACK(on_context_menu), NULL);
|
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(window), web_view);
|
|
||||||
g_signal_connect(window, "destroy", G_CALLBACK(on_window_destroy), NULL);
|
|
||||||
|
|
||||||
webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), url);
|
|
||||||
gtk_widget_show_all(window);
|
|
||||||
|
|
||||||
gtk_main();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
import "C"
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"path/filepath"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
_ = os.Setenv("WEBKIT_DISABLE_DMABUF_RENDERER", "1")
|
|
||||||
_ = os.Setenv("WEBKIT_FORCE_COMPOSITING_MODE", "1")
|
|
||||||
_ = os.Setenv("JSC_SIGNAL_FOR_GC", "SIGUSR2")
|
|
||||||
}
|
|
||||||
|
|
||||||
// installDesktopIntegration automatically installs icons and desktop file into user's XDG directories
|
|
||||||
func installDesktopIntegration() {
|
|
||||||
home, err := os.UserHomeDir()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
iconDir := filepath.Join(home, ".local", "share", "icons", "hicolor", "512x512", "apps")
|
|
||||||
pixmapDir := filepath.Join(home, ".local", "share", "pixmaps")
|
|
||||||
appDir := filepath.Join(home, ".local", "share", "applications")
|
|
||||||
_ = os.MkdirAll(iconDir, 0755)
|
|
||||||
_ = os.MkdirAll(pixmapDir, 0755)
|
|
||||||
_ = os.MkdirAll(appDir, 0755)
|
|
||||||
|
|
||||||
iconPng, _ := webFS.ReadFile("web/icon.png")
|
|
||||||
if len(iconPng) > 0 {
|
|
||||||
_ = os.WriteFile(filepath.Join(iconDir, "benzcloud-client.png"), iconPng, 0644)
|
|
||||||
_ = os.WriteFile(filepath.Join(pixmapDir, "benzcloud-client.png"), iconPng, 0644)
|
|
||||||
}
|
|
||||||
iconSvg, _ := webFS.ReadFile("web/icon.svg")
|
|
||||||
if len(iconSvg) > 0 {
|
|
||||||
svgDir := filepath.Join(home, ".local", "share", "icons", "hicolor", "scalable", "apps")
|
|
||||||
_ = os.MkdirAll(svgDir, 0755)
|
|
||||||
_ = os.WriteFile(filepath.Join(svgDir, "benzcloud-client.svg"), iconSvg, 0644)
|
|
||||||
}
|
|
||||||
|
|
||||||
desktopPath := filepath.Join(appDir, "benzcloud-client.desktop")
|
|
||||||
execPath, _ := os.Executable()
|
|
||||||
if execPath == "" {
|
|
||||||
execPath = "benzcloud-client"
|
|
||||||
}
|
|
||||||
content := fmt.Sprintf(`[Desktop Entry]
|
|
||||||
Name=BenzCloud Client
|
|
||||||
Comment=Secure Self-Hosted Cloud Mesh Client
|
|
||||||
Exec=%s
|
|
||||||
Icon=benzcloud-client
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
Categories=Network;FileTransfer;Utility;
|
|
||||||
StartupWMClass=benzcloud-client
|
|
||||||
X-Wayland-AppID=benzcloud-client
|
|
||||||
`, execPath)
|
|
||||||
_ = os.WriteFile(desktopPath, []byte(content), 0644)
|
|
||||||
}
|
|
||||||
|
|
||||||
// LaunchGUI launches native WebKitGTK desktop shell on Linux.
|
|
||||||
func LaunchGUI(title, url string, width, height int) {
|
|
||||||
installDesktopIntegration()
|
|
||||||
|
|
||||||
hasDisplay := os.Getenv("DISPLAY") != "" || os.Getenv("WAYLAND_DISPLAY") != ""
|
|
||||||
if !hasDisplay || C.check_display() == 0 {
|
|
||||||
log.Println("[GUI] Kein Display gefunden, öffne Standard-Browser...")
|
|
||||||
_ = exec.Command("xdg-open", url).Start()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
cTitle := C.CString(title)
|
|
||||||
cURL := C.CString(url)
|
|
||||||
defer C.free(unsafe.Pointer(cTitle))
|
|
||||||
defer C.free(unsafe.Pointer(cURL))
|
|
||||||
|
|
||||||
iconBytes, _ := webFS.ReadFile("web/icon.png")
|
|
||||||
var iconPtr unsafe.Pointer
|
|
||||||
if len(iconBytes) > 0 {
|
|
||||||
iconPtr = unsafe.Pointer(&iconBytes[0])
|
|
||||||
}
|
|
||||||
|
|
||||||
C.activate_gtk_app(cTitle, cURL, C.int(width), C.int(height), iconPtr, C.int(len(iconBytes)))
|
|
||||||
}
|
|
||||||
22
gui_other.go
@ -1,22 +0,0 @@
|
|||||||
//go:build (!linux && !windows) || (linux && !cgo)
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log"
|
|
||||||
"os/exec"
|
|
||||||
"runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// LaunchGUI opens default browser as fallback.
|
|
||||||
func LaunchGUI(title, url string, width, height int) {
|
|
||||||
log.Printf("[BenzCloud Client] Opening interface at %s\n", url)
|
|
||||||
var cmd *exec.Cmd
|
|
||||||
switch runtime.GOOS {
|
|
||||||
case "darwin":
|
|
||||||
cmd = exec.Command("open", url)
|
|
||||||
default:
|
|
||||||
cmd = exec.Command("xdg-open", url)
|
|
||||||
}
|
|
||||||
_ = cmd.Start()
|
|
||||||
}
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
//go:build windows
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os/exec"
|
|
||||||
"syscall"
|
|
||||||
)
|
|
||||||
|
|
||||||
// LaunchGUI launches Windows app mode using Edge or Chrome without CGO.
|
|
||||||
func LaunchGUI(title, url string, width, height int) {
|
|
||||||
appArg := fmt.Sprintf("--app=%s", url)
|
|
||||||
windowSizeArg := fmt.Sprintf("--window-size=%d,%d", width, height)
|
|
||||||
|
|
||||||
// Try Microsoft Edge
|
|
||||||
cmd := exec.Command("msedge.exe", appArg, windowSizeArg)
|
|
||||||
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: false}
|
|
||||||
if err := cmd.Start(); err == nil {
|
|
||||||
_ = cmd.Wait()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try Chrome
|
|
||||||
cmdChrome := exec.Command("chrome.exe", appArg, windowSizeArg)
|
|
||||||
if err := cmdChrome.Start(); err == nil {
|
|
||||||
_ = cmdChrome.Wait()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback to default browser
|
|
||||||
_ = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
|
|
||||||
}
|
|
||||||
336
index.html
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>BenzCloud Client · Desktop & Mobile Mesh-Cockpit</title>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Navigation Header -->
|
||||||
|
<header class="site-header">
|
||||||
|
<div class="nav-container">
|
||||||
|
<div class="nav-left">
|
||||||
|
<a href="https://benzjeremy.github.io/" class="back-root-btn">
|
||||||
|
<span>← benzjeremy.github.io</span>
|
||||||
|
</a>
|
||||||
|
<a href="index.html" class="brand-link">
|
||||||
|
<span class="brand-logo">💻</span>
|
||||||
|
<span class="brand-name">BenzCloud Client</span>
|
||||||
|
<span class="brand-ver">v1.0</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="main-nav">
|
||||||
|
<a href="app/">
|
||||||
|
<span class="lang-de">Cockpit</span>
|
||||||
|
<span class="lang-en" style="display:none;">Cockpit</span>
|
||||||
|
</a>
|
||||||
|
<a href="#features">
|
||||||
|
<span class="lang-de">Features</span>
|
||||||
|
<span class="lang-en" style="display:none;">Features</span>
|
||||||
|
</a>
|
||||||
|
<a href="#pairing">
|
||||||
|
<span class="lang-de">Pairing-Ablauf</span>
|
||||||
|
<span class="lang-en" style="display:none;">Pairing Flow</span>
|
||||||
|
</a>
|
||||||
|
<a href="#downloads">
|
||||||
|
<span class="lang-de">Downloads</span>
|
||||||
|
<span class="lang-en" style="display:none;">Downloads</span>
|
||||||
|
</a>
|
||||||
|
<a href="#about">
|
||||||
|
<span class="lang-de">Über das Projekt</span>
|
||||||
|
<span class="lang-en" style="display:none;">About</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="lang-switch" role="group" aria-label="Sprachauswahl">
|
||||||
|
<button type="button" class="lang-btn active" id="btn-lang-de" onclick="setLang('de')">DE</button>
|
||||||
|
<button type="button" class="lang-btn" id="btn-lang-en" onclick="setLang('en')">EN</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="https://github.com/benzjeremy/benzcloud-client" target="_blank" rel="noopener noreferrer" class="btn-github">
|
||||||
|
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor"><path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"/></svg>
|
||||||
|
<span>GitHub</span>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Hero Section -->
|
||||||
|
<section class="hero-section">
|
||||||
|
<div class="badge-pill">
|
||||||
|
<span>⚡</span>
|
||||||
|
<span class="lang-de">Zero-Config Mesh-Client · 100% Datenschutz</span>
|
||||||
|
<span class="lang-en" style="display:none;">Zero-Config Mesh Client · 100% Privacy</span>
|
||||||
|
</div>
|
||||||
|
<h1 class="hero-title">
|
||||||
|
<span class="lang-de">Ihr persönlicher Zugang zur <span>BenzCloud</span></span>
|
||||||
|
<span class="lang-en" style="display:none;">Your Personal Gateway to <span>BenzCloud</span></span>
|
||||||
|
</h1>
|
||||||
|
<p class="hero-subtitle">
|
||||||
|
<span class="lang-de">Verbinden Sie PCs und Android-Smartphones vollautomatisch mit Ihrer privaten Cloud. Ein QR-Code oder Pairing-Token genügt – Mesh-VPN, Host-Auflösung und Zugriffsrechte richten sich ohne technische Vorkenntnisse ein.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Seamlessly connect PCs and Android devices to your private cloud suite. Scan a QR code or paste a pairing token — mesh VPN routing, host resolution, and services configure instantly.</span>
|
||||||
|
</p>
|
||||||
|
<div class="hero-cta">
|
||||||
|
<a href="app/" class="btn-primary">
|
||||||
|
<span class="lang-de">🚀 Client-Cockpit testen</span>
|
||||||
|
<span class="lang-en" style="display:none;">🚀 Test Client Cockpit</span>
|
||||||
|
</a>
|
||||||
|
<a href="#downloads" class="btn-secondary">
|
||||||
|
<span class="lang-de">📥 Downloads (PC & Android)</span>
|
||||||
|
<span class="lang-en" style="display:none;">📥 Downloads (PC & Android)</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Features Section -->
|
||||||
|
<section class="section" id="features">
|
||||||
|
<div class="section-header">
|
||||||
|
<h2 class="section-title">
|
||||||
|
<span class="lang-de">Highlights & Funktionsumfang</span>
|
||||||
|
<span class="lang-en" style="display:none;">Highlights & Capabilities</span>
|
||||||
|
</h2>
|
||||||
|
<p class="section-desc">
|
||||||
|
<span class="lang-de">Höchste Ergonomie und kompromissloser Schutz Ihrer Privatsphäre.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Superior interaction ergonomics combined with uncompromising privacy.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid-3">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-icon">🔗</div>
|
||||||
|
<h3 class="card-title">
|
||||||
|
<span class="lang-de">One-Click QR-Pairing</span>
|
||||||
|
<span class="lang-en" style="display:none;">One-Click QR Pairing</span>
|
||||||
|
</h3>
|
||||||
|
<p class="card-desc">
|
||||||
|
<span class="lang-de">Kein manuelles Eintippen kryptischer IP-Adressen oder Zertifikate: Scannen Sie den QR-Code vom Server-Dashboard oder fügen Sie den Einmal-Token ein.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Zero manual configuration of complex IP addresses or keys: Simply scan the QR code from the server dashboard or paste your pairing token.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-icon">🚀</div>
|
||||||
|
<h3 class="card-title">
|
||||||
|
<span class="lang-de">Zentraler Service-Launcher</span>
|
||||||
|
<span class="lang-en" style="display:none;">Unified Service Launcher</span>
|
||||||
|
</h3>
|
||||||
|
<p class="card-desc">
|
||||||
|
<span class="lang-de">Direkter Schnellzugriff auf alle aktivierten Clouddienste: Dateitresor (Drive), Webmail, Mesh-Chat und gehostete Webprojekte aus einer Hand.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Instant access to all enabled cloud services: Encrypted Drive, Webmail, Mesh Chat, and hosted Web projects with single-click launching.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-icon">🛡️</div>
|
||||||
|
<h3 class="card-title">
|
||||||
|
<span class="lang-de">Unentziehbare Mesh-Rechte</span>
|
||||||
|
<span class="lang-en" style="display:none;">Immutable Mesh Privileges</span>
|
||||||
|
</h3>
|
||||||
|
<p class="card-desc">
|
||||||
|
<span class="lang-de">Garantierte Konnektivität: VPN- und DNS-Privilegien sind architektonisch unentziehbar verankert. Kein Account kann ausgesperrt werden.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Guaranteed connectivity: VPN and DNS privileges are architecturally immutable, ensuring no user can be locked out from the network overlay.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Pairing Section -->
|
||||||
|
<section class="section" id="pairing">
|
||||||
|
<div class="section-header">
|
||||||
|
<h2 class="section-title">
|
||||||
|
<span class="lang-de">In 3 Schritten verbunden</span>
|
||||||
|
<span class="lang-en" style="display:none;">Connected in 3 Easy Steps</span>
|
||||||
|
</h2>
|
||||||
|
<p class="section-desc">
|
||||||
|
<span class="lang-de">Dau-optimierter Verbindungsprozess ohne Router-Eingriffe oder Fachwissen.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Frictionless pairing flow without router modifications or networking expertise.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pairing-card">
|
||||||
|
<div>
|
||||||
|
<div class="pairing-step">
|
||||||
|
<div class="step-num">1</div>
|
||||||
|
<div class="step-content">
|
||||||
|
<h4>
|
||||||
|
<span class="lang-de">Server starten & Domain wählen</span>
|
||||||
|
<span class="lang-en" style="display:none;">Start Server & Choose Domain</span>
|
||||||
|
</h4>
|
||||||
|
<p>
|
||||||
|
<span class="lang-de">Im Server-Cockpit die gewünschte Wunschdomain (z. B. <code>meinefirma.local</code>) festlegen.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Set your preferred domain (e.g. <code>mycompany.local</code>) in the server wizard.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pairing-step">
|
||||||
|
<div class="step-num">2</div>
|
||||||
|
<div class="step-content">
|
||||||
|
<h4>
|
||||||
|
<span class="lang-de">Pairing-Code abrufen</span>
|
||||||
|
<span class="lang-en" style="display:none;">Retrieve Pairing Code</span>
|
||||||
|
</h4>
|
||||||
|
<p>
|
||||||
|
<span class="lang-de">Auf „Gerät koppeln“ klicken, um den QR-Code oder den sicheren 32-Byte-Token anzuzeigen.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Click "Pair Device" to display the QR code or cryptographic 32-byte pairing token.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pairing-step">
|
||||||
|
<div class="step-num">3</div>
|
||||||
|
<div class="step-content">
|
||||||
|
<h4>
|
||||||
|
<span class="lang-de">Client verbinden</span>
|
||||||
|
<span class="lang-en" style="display:none;">Connect Client</span>
|
||||||
|
</h4>
|
||||||
|
<p>
|
||||||
|
<span class="lang-de">Im Client einfügen oder scannen – fertig! Mesh-VPN und DNS-Pfade konfigurieren sich selbst.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Paste or scan in the client app — done! Mesh VPN and DNS pathways configure automatically.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="text-align: center; background: var(--bg-card); padding: 2rem; border-radius: var(--radius-md); border: 1px solid var(--border-subtle);">
|
||||||
|
<div style="font-size: 3.5rem; margin-bottom: 0.5rem;">📲</div>
|
||||||
|
<h4 style="color: var(--accent-primary); margin-bottom: 0.5rem;">One-Click Mesh Handshake</h4>
|
||||||
|
<p style="font-size: 0.85rem; color: var(--text-secondary);">End-to-End Encrypted via Noise Protocol</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Downloads Section -->
|
||||||
|
<section class="section" id="downloads">
|
||||||
|
<div class="section-header">
|
||||||
|
<h2 class="section-title">
|
||||||
|
<span class="lang-de">Pakete & Downloads</span>
|
||||||
|
<span class="lang-en" style="display:none;">Packages & Downloads</span>
|
||||||
|
</h2>
|
||||||
|
<p class="section-desc">
|
||||||
|
<span class="lang-de">Alle offiziellen Builds für Linux, Windows und Android.</span>
|
||||||
|
<span class="lang-en" style="display:none;">Official verified binaries for Linux, Windows, and Android.</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="download-grid">
|
||||||
|
<div class="download-card">
|
||||||
|
<div class="download-icon">🐧</div>
|
||||||
|
<div class="download-title">Linux x86_64</div>
|
||||||
|
<div class="download-meta">Single Binary · ~10.6 MB</div>
|
||||||
|
<a href="https://raw.githubusercontent.com/benzjeremy/benzstore/content/linux/benzcloud-client/benzcloud-client_1.0" class="btn-download">
|
||||||
|
<span class="lang-de">Binary herunterladen</span>
|
||||||
|
<span class="lang-en" style="display:none;">Download Binary</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="download-card">
|
||||||
|
<div class="download-icon">🪟</div>
|
||||||
|
<div class="download-title">Windows x86_64</div>
|
||||||
|
<div class="download-meta">Native Executable · ~11.3 MB</div>
|
||||||
|
<a href="https://raw.githubusercontent.com/benzjeremy/benzstore/content/windows/benzcloud-client/benzcloud-client_1.0.exe" class="btn-download">
|
||||||
|
<span class="lang-de">.exe herunterladen</span>
|
||||||
|
<span class="lang-en" style="display:none;">Download .exe</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="download-card">
|
||||||
|
<div class="download-icon">🤖</div>
|
||||||
|
<div class="download-title">Android APK</div>
|
||||||
|
<div class="download-meta">Signed APK · ~17 KB</div>
|
||||||
|
<a href="https://raw.githubusercontent.com/benzjeremy/benzstore/content/android/benzcloud-client/benzcloud-client_1.0.apk" class="btn-download">
|
||||||
|
<span class="lang-de">APK herunterladen</span>
|
||||||
|
<span class="lang-en" style="display:none;">Download APK</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="download-card">
|
||||||
|
<div class="download-icon">🏪</div>
|
||||||
|
<div class="download-title">BenzStore</div>
|
||||||
|
<div class="download-meta">One-Click Install & Updates</div>
|
||||||
|
<a href="https://benzjeremy.github.io/benzstore/" class="btn-download" style="background-color: var(--accent-primary); color: #000;">
|
||||||
|
<span class="lang-de">Im BenzStore öffnen</span>
|
||||||
|
<span class="lang-en" style="display:none;">Open in BenzStore</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- About Section -->
|
||||||
|
<section class="section" id="about">
|
||||||
|
<div class="about-box">
|
||||||
|
<div class="about-header">
|
||||||
|
<img src="https://github.com/benzjeremy.png" alt="Jeremy Benz" class="author-avatar">
|
||||||
|
<div class="author-info">
|
||||||
|
<h3>Jeremy Benz (@benzjeremy)</h3>
|
||||||
|
<p>
|
||||||
|
<span class="lang-de">Open-Source-Entwickler & Architekt souveräner Software-Ökosysteme</span>
|
||||||
|
<span class="lang-en" style="display:none;">Open-Source Developer & Architect of Sovereign Software Ecosystems</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p style="color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6;">
|
||||||
|
<span class="lang-de">Der BenzCloud Client verbindet Endgeräte ohne Zwischenstationen direkt über verschlüsselte Peer-to-Peer-Tunnel mit privaten BenzCloud-Instanzen. Lizenziert unter der freien GNU General Public License v3.0 (GPL-3.0).</span>
|
||||||
|
<span class="lang-en" style="display:none;">The BenzCloud Client bridges personal devices directly to self-hosted instances over encrypted peer-to-peer tunnels. Licensed under the GNU General Public License v3.0 (GPL-3.0).</span>
|
||||||
|
</p>
|
||||||
|
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
||||||
|
<a href="https://github.com/benzjeremy/benzcloud-client/blob/main/LICENSE" target="_blank" rel="noopener noreferrer" style="color: var(--accent-primary); text-decoration: none; font-weight: 600; font-size: 0.9rem;">
|
||||||
|
⚖️ GNU GPLv3 Lizenz
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/benzjeremy/benzcloud-client" target="_blank" rel="noopener noreferrer" style="color: var(--accent-primary); text-decoration: none; font-weight: 600; font-size: 0.9rem;">
|
||||||
|
📦 GitHub Repository
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<footer class="site-footer">
|
||||||
|
<div class="footer-container">
|
||||||
|
<div>
|
||||||
|
© 2026 Jeremy Benz · BenzCloud Ecosystem · GNU GPLv3
|
||||||
|
</div>
|
||||||
|
<div class="footer-links">
|
||||||
|
<a href="https://benzjeremy.github.io/impressum.html">
|
||||||
|
<span class="lang-de">Impressum</span>
|
||||||
|
<span class="lang-en" style="display:none;">Legal Notice</span>
|
||||||
|
</a>
|
||||||
|
<a href="https://benzjeremy.github.io/datenschutz.html">
|
||||||
|
<span class="lang-de">Datenschutz</span>
|
||||||
|
<span class="lang-en" style="display:none;">Privacy Policy</span>
|
||||||
|
</a>
|
||||||
|
<a href="https://benzjeremy.github.io/">
|
||||||
|
<span class="lang-de">Hauptseite</span>
|
||||||
|
<span class="lang-en" style="display:none;">Main Hub</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function setLang(lang) {
|
||||||
|
localStorage.setItem('benzcloud_lang', lang);
|
||||||
|
document.documentElement.lang = lang;
|
||||||
|
|
||||||
|
const isDe = lang === 'de';
|
||||||
|
document.querySelectorAll('.lang-de').forEach(el => el.style.display = isDe ? '' : 'none');
|
||||||
|
document.querySelectorAll('.lang-en').forEach(el => el.style.display = isDe ? 'none' : '');
|
||||||
|
|
||||||
|
const btnDe = document.getElementById('btn-lang-de');
|
||||||
|
const btnEn = document.getElementById('btn-lang-en');
|
||||||
|
if (btnDe && btnEn) {
|
||||||
|
btnDe.classList.toggle('active', isDe);
|
||||||
|
btnEn.classList.toggle('active', !isDe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const savedLang = localStorage.getItem('benzcloud_lang') || 'de';
|
||||||
|
setLang(savedLang);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -1,148 +0,0 @@
|
|||||||
package pairing
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"encoding/json"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ClientProfile stores the pairing status and credentials.
|
|
||||||
type ClientProfile struct {
|
|
||||||
ServerLANURL string `json:"server_lan_url"`
|
|
||||||
Username string `json:"username"`
|
|
||||||
BaseDomain string `json:"base_domain"`
|
|
||||||
OverlayIP string `json:"overlay_ip"`
|
|
||||||
ServerVPNIP string `json:"server_vpn_ip"`
|
|
||||||
SessionToken string `json:"session_token"`
|
|
||||||
Paired bool `json:"paired"`
|
|
||||||
PairedAt time.Time `json:"paired_at"`
|
|
||||||
Permissions map[string]bool `json:"permissions"`
|
|
||||||
ConfigDir string `json:"config_dir"`
|
|
||||||
mu sync.RWMutex
|
|
||||||
}
|
|
||||||
|
|
||||||
var ErrNotPaired = errors.New("client is not paired with a BenzCloud server")
|
|
||||||
|
|
||||||
// Pair connects to the BenzCloud server via local IP, exchanges credentials, and saves the mesh VPN config.
|
|
||||||
func Pair(serverURL, username, password, configDir string) (*ClientProfile, error) {
|
|
||||||
if err := os.MkdirAll(configDir, 0700); err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to create config dir: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanURL := strings.TrimRight(serverURL, "/")
|
|
||||||
pairEndpoint := cleanURL + "/api/pair"
|
|
||||||
|
|
||||||
reqBody, _ := json.Marshal(map[string]string{
|
|
||||||
"username": username,
|
|
||||||
"password": password,
|
|
||||||
})
|
|
||||||
|
|
||||||
client := http.Client{Timeout: 10 * time.Second}
|
|
||||||
resp, err := client.Post(pairEndpoint, "application/json", bytes.NewReader(reqBody))
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("pairing request to %s failed: %w", pairEndpoint, err)
|
|
||||||
}
|
|
||||||
defer resp.Body.Close()
|
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
|
||||||
var errResp map[string]string
|
|
||||||
_ = json.NewDecoder(resp.Body).Decode(&errResp)
|
|
||||||
return nil, fmt.Errorf("server rejected pairing (HTTP %d): %s", resp.StatusCode, errResp["error"])
|
|
||||||
}
|
|
||||||
|
|
||||||
var pairData struct {
|
|
||||||
Status string `json:"status"`
|
|
||||||
Username string `json:"username"`
|
|
||||||
BaseDomain string `json:"base_domain"`
|
|
||||||
OverlayIP string `json:"overlay_ip"`
|
|
||||||
ServerVPNIP string `json:"server_vpn_ip"`
|
|
||||||
CertPEM string `json:"cert_pem"`
|
|
||||||
KeyPEM string `json:"key_pem"`
|
|
||||||
ClientConfigYAML string `json:"client_config_yaml"`
|
|
||||||
SessionToken string `json:"session_token"`
|
|
||||||
Permissions map[string]bool `json:"permissions"`
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := json.NewDecoder(resp.Body).Decode(&pairData); err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to parse pairing response: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write mesh VPN files to disk
|
|
||||||
yamlPath := filepath.Join(configDir, "client_nebula.yaml")
|
|
||||||
if err := os.WriteFile(yamlPath, []byte(pairData.ClientConfigYAML), 0600); err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to write nebula config: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
profile := &ClientProfile{
|
|
||||||
ServerLANURL: cleanURL,
|
|
||||||
Username: pairData.Username,
|
|
||||||
BaseDomain: pairData.BaseDomain,
|
|
||||||
OverlayIP: pairData.OverlayIP,
|
|
||||||
ServerVPNIP: pairData.ServerVPNIP,
|
|
||||||
SessionToken: pairData.SessionToken,
|
|
||||||
Paired: true,
|
|
||||||
PairedAt: time.Now().UTC(),
|
|
||||||
Permissions: pairData.Permissions,
|
|
||||||
ConfigDir: configDir,
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := profile.Save(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return profile, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ProfilePath returns the location of pairing.json.
|
|
||||||
func (p *ClientProfile) ProfilePath() string {
|
|
||||||
return filepath.Join(p.ConfigDir, "pairing.json")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save persists the profile to disk with 0600 permissions.
|
|
||||||
func (p *ClientProfile) Save() error {
|
|
||||||
p.mu.Lock()
|
|
||||||
defer p.mu.Unlock()
|
|
||||||
|
|
||||||
data, err := json.MarshalIndent(p, "", " ")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
tmpFile := p.ProfilePath() + ".tmp"
|
|
||||||
if err := os.WriteFile(tmpFile, data, 0600); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return os.Rename(tmpFile, p.ProfilePath())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load loads the profile from configDir.
|
|
||||||
func Load(configDir string) (*ClientProfile, error) {
|
|
||||||
pPath := filepath.Join(configDir, "pairing.json")
|
|
||||||
data, err := os.ReadFile(pPath)
|
|
||||||
if err != nil {
|
|
||||||
if os.IsNotExist(err) {
|
|
||||||
return &ClientProfile{ConfigDir: configDir, Paired: false}, ErrNotPaired
|
|
||||||
}
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var p ClientProfile
|
|
||||||
if err := json.Unmarshal(data, &p); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
p.ConfigDir = configDir
|
|
||||||
return &p, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unpair removes pairing data from disk.
|
|
||||||
func Unpair(configDir string) error {
|
|
||||||
pPath := filepath.Join(configDir, "pairing.json")
|
|
||||||
yamlPath := filepath.Join(configDir, "client_nebula.yaml")
|
|
||||||
_ = os.Remove(yamlPath)
|
|
||||||
return os.Remove(pPath)
|
|
||||||
}
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
package pairing
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"net/http"
|
|
||||||
"net/http/httptest"
|
|
||||||
"os"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestClientPairing(t *testing.T) {
|
|
||||||
tempDir, err := os.MkdirTemp("", "benzcloud_client_pairing_test")
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
defer os.RemoveAll(tempDir)
|
|
||||||
|
|
||||||
// Mock server /api/pair endpoint
|
|
||||||
mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
if r.URL.Path != "/api/pair" {
|
|
||||||
http.NotFound(w, r)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var req map[string]string
|
|
||||||
_ = json.NewDecoder(r.Body).Decode(&req)
|
|
||||||
|
|
||||||
if req["username"] != "testuser" || req["password"] != "ValidPassword123" {
|
|
||||||
w.WriteHeader(http.StatusUnauthorized)
|
|
||||||
_ = json.NewEncoder(w).Encode(map[string]string{"error": "invalid credentials"})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
resp := map[string]interface{}{
|
|
||||||
"status": "paired",
|
|
||||||
"username": "testuser",
|
|
||||||
"base_domain": "benzjeremy.de",
|
|
||||||
"overlay_ip": "10.42.0.2",
|
|
||||||
"server_vpn_ip": "10.42.0.1",
|
|
||||||
"client_config_yaml": "# Mock Client Nebula Config\nlisten: 0.0.0.0:0\n",
|
|
||||||
"session_token": "mock_session_token_12345",
|
|
||||||
"permissions": map[string]bool{
|
|
||||||
"vpn": true,
|
|
||||||
"dns": true,
|
|
||||||
"drive": true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
|
||||||
_ = json.NewEncoder(w).Encode(resp)
|
|
||||||
}))
|
|
||||||
defer mockServer.Close()
|
|
||||||
|
|
||||||
// 1. Initial Load: should return ErrNotPaired
|
|
||||||
_, err = Load(tempDir)
|
|
||||||
if err != ErrNotPaired {
|
|
||||||
t.Fatalf("Expected ErrNotPaired, got %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. Perform Pairing
|
|
||||||
profile, err := Pair(mockServer.URL, "testuser", "ValidPassword123", tempDir)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("Pair failed: %v", err)
|
|
||||||
}
|
|
||||||
if !profile.Paired || profile.BaseDomain != "benzjeremy.de" || profile.OverlayIP != "10.42.0.2" {
|
|
||||||
t.Fatalf("Unexpected profile state: %+v", profile)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Reload from disk
|
|
||||||
loaded, err := Load(tempDir)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("Load failed: %v", err)
|
|
||||||
}
|
|
||||||
if loaded.SessionToken != "mock_session_token_12345" {
|
|
||||||
t.Fatalf("Loaded token mismatch: %s", loaded.SessionToken)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. Unpair
|
|
||||||
if err := Unpair(tempDir); err != nil {
|
|
||||||
t.Fatalf("Unpair failed: %v", err)
|
|
||||||
}
|
|
||||||
_, err = Load(tempDir)
|
|
||||||
if err != ErrNotPaired {
|
|
||||||
t.Fatal("Expected ErrNotPaired after Unpair")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
158
main.go
@ -1,158 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"embed"
|
|
||||||
"encoding/json"
|
|
||||||
"flag"
|
|
||||||
"fmt"
|
|
||||||
"io/fs"
|
|
||||||
"log"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"path/filepath"
|
|
||||||
"syscall"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/benzjeremy/benzcloud-client/internal/pairing"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:embed web/*
|
|
||||||
var webFS embed.FS
|
|
||||||
|
|
||||||
const Version = "v1.0"
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
var (
|
|
||||||
portFlag int
|
|
||||||
configFlag string
|
|
||||||
serverFlag string
|
|
||||||
userFlag string
|
|
||||||
passFlag string
|
|
||||||
daemonFlag bool
|
|
||||||
versionFlag bool
|
|
||||||
)
|
|
||||||
|
|
||||||
flag.IntVar(&portFlag, "port", 8088, "Local client control port")
|
|
||||||
flag.StringVar(&configFlag, "config", "", "Client configuration directory")
|
|
||||||
flag.StringVar(&serverFlag, "server", "", "Server URL to pair with via CLI")
|
|
||||||
flag.StringVar(&userFlag, "user", "", "Username for pairing")
|
|
||||||
flag.StringVar(&passFlag, "pass", "", "Password for pairing")
|
|
||||||
flag.BoolVar(&daemonFlag, "daemon", false, "Run in background daemon mode")
|
|
||||||
flag.BoolVar(&versionFlag, "version", false, "Print version and exit")
|
|
||||||
flag.Parse()
|
|
||||||
|
|
||||||
if versionFlag {
|
|
||||||
fmt.Printf("BenzCloud Client %s (Lead Engineer: Jeremy Benz • GNU GPLv3)\n", Version)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if configFlag == "" {
|
|
||||||
home, err := os.UserHomeDir()
|
|
||||||
if err != nil {
|
|
||||||
configFlag = "./benzcloud-client-data"
|
|
||||||
} else {
|
|
||||||
configFlag = filepath.Join(home, ".benzcloud", "client")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_ = os.MkdirAll(configFlag, 0700)
|
|
||||||
|
|
||||||
// CLI pairing mode
|
|
||||||
if serverFlag != "" && userFlag != "" && passFlag != "" {
|
|
||||||
fmt.Printf("==> Pairing with BenzCloud Server at %s as %s...\n", serverFlag, userFlag)
|
|
||||||
prof, err := pairing.Pair(serverFlag, userFlag, passFlag, configFlag)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("Pairing failed: %v\n", err)
|
|
||||||
}
|
|
||||||
fmt.Printf("✅ Success! Paired with %s (Overlay IP: %s, Base Domain: %s)\n",
|
|
||||||
prof.ServerLANURL, prof.OverlayIP, prof.BaseDomain)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Client local control HTTP server
|
|
||||||
mux := http.NewServeMux()
|
|
||||||
|
|
||||||
mux.HandleFunc("/api/profile", func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
prof, err := pairing.Load(configFlag)
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
|
||||||
if err != nil {
|
|
||||||
_ = json.NewEncoder(w).Encode(map[string]interface{}{"paired": false})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
_ = json.NewEncoder(w).Encode(prof)
|
|
||||||
})
|
|
||||||
|
|
||||||
mux.HandleFunc("/api/pair", func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
if r.Method != http.MethodPost {
|
|
||||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var req struct {
|
|
||||||
ServerURL string `json:"server_url"`
|
|
||||||
Username string `json:"username"`
|
|
||||||
Password string `json:"password"`
|
|
||||||
}
|
|
||||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
|
||||||
http.Error(w, "Invalid payload", http.StatusBadRequest)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
prof, err := pairing.Pair(req.ServerURL, req.Username, req.Password, configFlag)
|
|
||||||
if err != nil {
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
|
||||||
_ = json.NewEncoder(w).Encode(map[string]string{"error": err.Error()})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
|
||||||
_ = json.NewEncoder(w).Encode(prof)
|
|
||||||
})
|
|
||||||
|
|
||||||
mux.HandleFunc("/api/unpair", func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
if r.Method != http.MethodPost {
|
|
||||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
_ = pairing.Unpair(configFlag)
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
|
||||||
_ = json.NewEncoder(w).Encode(map[string]bool{"success": true})
|
|
||||||
})
|
|
||||||
|
|
||||||
subFS, err := fs.Sub(webFS, "web")
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("Fatal: failed to load embedded web assets: %v\n", err)
|
|
||||||
}
|
|
||||||
mux.Handle("/", http.FileServer(http.FS(subFS)))
|
|
||||||
|
|
||||||
httpServer := &http.Server{
|
|
||||||
Addr: fmt.Sprintf("127.0.0.1:%d", portFlag),
|
|
||||||
Handler: mux,
|
|
||||||
}
|
|
||||||
|
|
||||||
appURL := fmt.Sprintf("http://127.0.0.1:%d", portFlag)
|
|
||||||
|
|
||||||
go func() {
|
|
||||||
log.Printf("🚀 [BenzCloud Client %s] Running on: %s\n", Version, appURL)
|
|
||||||
if err := httpServer.ListenAndServe(); err != nil && err != http.ErrServerClosed {
|
|
||||||
log.Fatalf("Fatal: client server failed: %v\n", err)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
if !daemonFlag && os.Getenv("DISPLAY") != "" && os.Getenv("HEADLESS") != "1" {
|
|
||||||
go func() {
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
LaunchGUI("BenzCloud Client", appURL, 900, 680)
|
|
||||||
}()
|
|
||||||
}
|
|
||||||
|
|
||||||
quit := make(chan os.Signal, 1)
|
|
||||||
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
|
|
||||||
<-quit
|
|
||||||
|
|
||||||
log.Println("\nStopping BenzCloud Client...")
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
|
||||||
defer cancel()
|
|
||||||
_ = httpServer.Shutdown(ctx)
|
|
||||||
log.Println("BenzCloud Client safely exited.")
|
|
||||||
}
|
|
||||||
389
style.css
Normal file
@ -0,0 +1,389 @@
|
|||||||
|
:root {
|
||||||
|
--bg-page: #080a0f;
|
||||||
|
--bg-surface: #0e121b;
|
||||||
|
--bg-card: #141a26;
|
||||||
|
--bg-card-hover: #1a2232;
|
||||||
|
--border-subtle: rgba(255, 255, 255, 0.08);
|
||||||
|
--border-strong: rgba(255, 255, 255, 0.16);
|
||||||
|
--border-accent: rgba(56, 189, 248, 0.35);
|
||||||
|
|
||||||
|
--accent-primary: #38bdf8;
|
||||||
|
--accent-primary-hover: #7dd3fc;
|
||||||
|
--accent-glow: rgba(56, 189, 248, 0.25);
|
||||||
|
--accent-green: #10b981;
|
||||||
|
--accent-purple: #a855f7;
|
||||||
|
|
||||||
|
--text-primary: #f8fafc;
|
||||||
|
--text-secondary: #94a3b8;
|
||||||
|
--text-muted: #64748b;
|
||||||
|
|
||||||
|
--font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
|
--font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
|
||||||
|
|
||||||
|
--radius-sm: 8px;
|
||||||
|
--radius-md: 14px;
|
||||||
|
--radius-lg: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
html { scroll-behavior: smooth; }
|
||||||
|
body {
|
||||||
|
font-family: var(--font-main);
|
||||||
|
background-color: var(--bg-page);
|
||||||
|
color: var(--text-primary);
|
||||||
|
line-height: 1.6;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
.site-header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 100;
|
||||||
|
background: rgba(8, 10, 15, 0.9);
|
||||||
|
backdrop-filter: blur(16px);
|
||||||
|
border-bottom: 1px solid var(--border-subtle);
|
||||||
|
}
|
||||||
|
.nav-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0.85rem 1.5rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.nav-left { display: flex; align-items: center; gap: 1.25rem; }
|
||||||
|
.back-root-btn {
|
||||||
|
color: var(--text-muted);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
transition: color 0.15s;
|
||||||
|
}
|
||||||
|
.back-root-btn:hover { color: var(--text-primary); }
|
||||||
|
.brand-link {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.6rem;
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
.brand-logo { font-size: 1.5rem; }
|
||||||
|
.brand-name { font-weight: 700; font-size: 1.15rem; }
|
||||||
|
.brand-ver {
|
||||||
|
font-size: 0.72rem;
|
||||||
|
background: rgba(56, 189, 248, 0.15);
|
||||||
|
color: var(--accent-primary);
|
||||||
|
padding: 0.15rem 0.45rem;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-nav { display: flex; align-items: center; gap: 1.25rem; }
|
||||||
|
.main-nav a {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.15s;
|
||||||
|
}
|
||||||
|
.main-nav a:hover { color: var(--accent-primary); }
|
||||||
|
|
||||||
|
.lang-switch {
|
||||||
|
display: flex;
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.lang-btn {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
color: var(--text-muted);
|
||||||
|
padding: 0.25rem 0.6rem;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.lang-btn.active {
|
||||||
|
background-color: var(--accent-primary);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-github {
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
color: var(--text-primary) !important;
|
||||||
|
padding: 0.4rem 0.8rem;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.4rem;
|
||||||
|
}
|
||||||
|
.btn-github:hover {
|
||||||
|
background-color: var(--bg-card-hover);
|
||||||
|
border-color: var(--border-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hero */
|
||||||
|
.hero-section {
|
||||||
|
padding: 5rem 1.5rem 4rem;
|
||||||
|
text-align: center;
|
||||||
|
max-width: 900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.badge-pill {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
background: rgba(56, 189, 248, 0.1);
|
||||||
|
border: 1px solid rgba(56, 189, 248, 0.25);
|
||||||
|
color: var(--accent-primary);
|
||||||
|
font-size: 0.82rem;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 0.35rem 0.9rem;
|
||||||
|
border-radius: 9999px;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
.hero-title {
|
||||||
|
font-size: 3rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: -0.03em;
|
||||||
|
line-height: 1.15;
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
}
|
||||||
|
.hero-title span {
|
||||||
|
color: var(--accent-primary);
|
||||||
|
text-shadow: 0 0 24px var(--accent-glow);
|
||||||
|
}
|
||||||
|
.hero-subtitle {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
line-height: 1.6;
|
||||||
|
margin-bottom: 2.25rem;
|
||||||
|
max-width: 720px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
.hero-cta {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--accent-primary);
|
||||||
|
color: #000;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
padding: 0.8rem 1.6rem;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.2s;
|
||||||
|
box-shadow: 0 4px 14px var(--accent-glow);
|
||||||
|
}
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: var(--accent-primary-hover);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
.btn-secondary {
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
color: var(--text-primary);
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
padding: 0.8rem 1.6rem;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
.btn-secondary:hover {
|
||||||
|
background-color: var(--bg-card-hover);
|
||||||
|
border-color: var(--border-accent);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sections */
|
||||||
|
.section {
|
||||||
|
padding: 4.5rem 1.5rem;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.section-header {
|
||||||
|
text-align: center;
|
||||||
|
max-width: 650px;
|
||||||
|
margin: 0 auto 3rem;
|
||||||
|
}
|
||||||
|
.section-title {
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
.section-desc {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Feature Grid */
|
||||||
|
.grid-3 {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
background-color: var(--bg-surface);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
padding: 1.75rem;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
.card:hover {
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
border-color: var(--border-accent);
|
||||||
|
transform: translateY(-3px);
|
||||||
|
}
|
||||||
|
.card-icon {
|
||||||
|
font-size: 2rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.card-title {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
.card-desc {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 0.92rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pairing Showcase */
|
||||||
|
.pairing-card {
|
||||||
|
background-color: var(--bg-surface);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
padding: 2.5rem;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||||
|
gap: 2rem;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.pairing-step {
|
||||||
|
display: flex;
|
||||||
|
gap: 1rem;
|
||||||
|
align-items: flex-start;
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
}
|
||||||
|
.step-num {
|
||||||
|
background: rgba(56, 189, 248, 0.15);
|
||||||
|
color: var(--accent-primary);
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.step-content h4 { font-size: 1rem; margin-bottom: 0.25rem; }
|
||||||
|
.step-content p { color: var(--text-secondary); font-size: 0.85rem; }
|
||||||
|
|
||||||
|
/* Downloads section */
|
||||||
|
.download-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
.download-card {
|
||||||
|
background-color: var(--bg-surface);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
padding: 2rem;
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
.download-icon { font-size: 2.5rem; }
|
||||||
|
.download-title { font-size: 1.2rem; font-weight: 700; }
|
||||||
|
.download-meta {
|
||||||
|
font-size: 0.78rem;
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
}
|
||||||
|
.btn-download {
|
||||||
|
width: 100%;
|
||||||
|
background-color: var(--bg-card);
|
||||||
|
border: 1px solid var(--border-strong);
|
||||||
|
color: var(--text-primary);
|
||||||
|
padding: 0.65rem 1rem;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.88rem;
|
||||||
|
transition: all 0.15s;
|
||||||
|
}
|
||||||
|
.btn-download:hover {
|
||||||
|
background-color: var(--accent-primary);
|
||||||
|
color: #000;
|
||||||
|
border-color: var(--accent-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* About / Open Source section */
|
||||||
|
.about-box {
|
||||||
|
background-color: var(--bg-surface);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
padding: 2.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
.about-header { display: flex; align-items: center; gap: 1rem; }
|
||||||
|
.author-avatar {
|
||||||
|
width: 54px;
|
||||||
|
height: 54px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid var(--accent-primary);
|
||||||
|
}
|
||||||
|
.author-info h3 { font-size: 1.25rem; font-weight: 700; }
|
||||||
|
.author-info p { color: var(--text-muted); font-size: 0.85rem; }
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
.site-footer {
|
||||||
|
margin-top: auto;
|
||||||
|
border-top: 1px solid var(--border-subtle);
|
||||||
|
background-color: var(--bg-surface);
|
||||||
|
padding: 2rem 1.5rem;
|
||||||
|
}
|
||||||
|
.footer-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 1rem;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
.footer-links { display: flex; gap: 1.25rem; }
|
||||||
|
.footer-links a {
|
||||||
|
color: var(--text-muted);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s;
|
||||||
|
}
|
||||||
|
.footer-links a:hover { color: var(--accent-primary); }
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.hero-title { font-size: 2.2rem; }
|
||||||
|
.main-nav { display: none; }
|
||||||
|
.footer-container { flex-direction: column; text-align: center; }
|
||||||
|
}
|
||||||
254
web/app.js
@ -1,254 +0,0 @@
|
|||||||
// BenzCloud Client App Controller
|
|
||||||
let currentLang = localStorage.getItem("benzcloud_client_lang") || "de";
|
|
||||||
let clientProfile = null;
|
|
||||||
|
|
||||||
const i18n = {
|
|
||||||
de: {
|
|
||||||
pair_badge: "🔗 Client-Ersteinrichtung",
|
|
||||||
pair_title: "Mit BenzCloud-Server verbinden",
|
|
||||||
pair_desc: "Gib die lokale IP-Adresse deines BenzCloud-Servers und deine Anmeldedaten ein. Das Mesh-VPN (Nebula) und der DNS-Server konfigurieren sich automatisch.",
|
|
||||||
lbl_server_url: "Server LAN-Adresse:",
|
|
||||||
lbl_user: "Benutzername:",
|
|
||||||
lbl_pass: "Passwort:",
|
|
||||||
btn_pair: "🚀 Gerät sicher koppeln & verbinden",
|
|
||||||
status_connected: "Verbunden mit BenzCloud",
|
|
||||||
services_heading: "Deine Enterprise-Dienste (Direktzugriff)",
|
|
||||||
card_drive_title: "BenzCloud Drive",
|
|
||||||
card_drive_desc: "Dateien hochladen, teilen und synchronisieren.",
|
|
||||||
card_mail_title: "BenzCloud Mail",
|
|
||||||
card_mail_desc: "Internes Webmail & Thunderbird-kompatibles Postfach.",
|
|
||||||
card_chat_title: "BenzCloud Chat",
|
|
||||||
card_chat_desc: "Echtzeit-Teamkommunikation & Direktnachrichten.",
|
|
||||||
card_web_title: "Webseiten & Portal",
|
|
||||||
card_web_desc: "Gehostete Firmen- und Team-Webseiten aufrufen.",
|
|
||||||
btn_unpair: "🔌 Entkoppeln / Gerät trennen",
|
|
||||||
pairing_in_progress: "⚙️ Kopplung läuft...",
|
|
||||||
confirm_unpair: "Möchtest du dieses Gerät wirklich vom BenzCloud-Server trennen?"
|
|
||||||
},
|
|
||||||
en: {
|
|
||||||
pair_badge: "🔗 Initial Client Setup",
|
|
||||||
pair_title: "Connect to BenzCloud Server",
|
|
||||||
pair_desc: "Enter your local BenzCloud server IP and your credentials. Mesh-VPN (Nebula) and DNS server will configure automatically.",
|
|
||||||
lbl_server_url: "Server LAN Address:",
|
|
||||||
lbl_user: "Username:",
|
|
||||||
lbl_pass: "Password:",
|
|
||||||
btn_pair: "🚀 Securely Pair & Connect Device",
|
|
||||||
status_connected: "Connected to BenzCloud",
|
|
||||||
services_heading: "Your Enterprise Services (Direct Access)",
|
|
||||||
card_drive_title: "BenzCloud Drive",
|
|
||||||
card_drive_desc: "Upload, share, and synchronize cloud files.",
|
|
||||||
card_mail_title: "BenzCloud Mail",
|
|
||||||
card_mail_desc: "Internal webmail & Thunderbird-compatible mailbox.",
|
|
||||||
card_chat_title: "BenzCloud Chat",
|
|
||||||
card_chat_desc: "Real-time team communication & direct messages.",
|
|
||||||
card_web_title: "Websites & Portal",
|
|
||||||
card_web_desc: "Browse hosted team and company websites.",
|
|
||||||
btn_unpair: "🔌 Disconnect / Unpair Device",
|
|
||||||
pairing_in_progress: "⚙️ Pairing in progress...",
|
|
||||||
confirm_unpair: "Are you sure you want to disconnect this device from BenzCloud?"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
applyLanguage(currentLang);
|
|
||||||
fetchClientProfile();
|
|
||||||
});
|
|
||||||
|
|
||||||
function setLanguage(lang) {
|
|
||||||
currentLang = lang;
|
|
||||||
localStorage.setItem("benzcloud_client_lang", lang);
|
|
||||||
applyLanguage(lang);
|
|
||||||
}
|
|
||||||
|
|
||||||
function applyLanguage(lang) {
|
|
||||||
document.documentElement.lang = lang;
|
|
||||||
document.querySelectorAll("[data-i18n]").forEach(el => {
|
|
||||||
const key = el.getAttribute("data-i18n");
|
|
||||||
if (i18n[lang] && i18n[lang][key]) {
|
|
||||||
el.textContent = i18n[lang][key];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
document.getElementById("langDE").classList.toggle("active", lang === "de");
|
|
||||||
document.getElementById("langEN").classList.toggle("active", lang === "en");
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchClientProfile() {
|
|
||||||
if (window.location.protocol === "file:") {
|
|
||||||
const stored = localStorage.getItem("benzcloud_profile");
|
|
||||||
if (stored) {
|
|
||||||
try {
|
|
||||||
clientProfile = JSON.parse(stored);
|
|
||||||
showConnectedView(clientProfile);
|
|
||||||
return;
|
|
||||||
} catch (e) {
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
showPairingView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const res = await fetch("/api/profile");
|
|
||||||
if (!res.ok) {
|
|
||||||
const stored = localStorage.getItem("benzcloud_profile");
|
|
||||||
if (stored) {
|
|
||||||
clientProfile = JSON.parse(stored);
|
|
||||||
showConnectedView(clientProfile);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
showPairingView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const data = await res.json();
|
|
||||||
if (!data.paired) {
|
|
||||||
showPairingView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
clientProfile = data;
|
|
||||||
showConnectedView(data);
|
|
||||||
} catch (err) {
|
|
||||||
const stored = localStorage.getItem("benzcloud_profile");
|
|
||||||
if (stored) {
|
|
||||||
try {
|
|
||||||
clientProfile = JSON.parse(stored);
|
|
||||||
showConnectedView(clientProfile);
|
|
||||||
return;
|
|
||||||
} catch (e) {
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
showPairingView();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showPairingView() {
|
|
||||||
document.getElementById("pairingView").style.display = "block";
|
|
||||||
document.getElementById("connectedView").style.display = "none";
|
|
||||||
}
|
|
||||||
|
|
||||||
function showConnectedView(data) {
|
|
||||||
document.getElementById("pairingView").style.display = "none";
|
|
||||||
document.getElementById("connectedView").style.display = "block";
|
|
||||||
|
|
||||||
document.getElementById("dispDomain").textContent = data.base_domain || "intern";
|
|
||||||
document.getElementById("dispOverlayIP").textContent = data.overlay_ip || "10.42.0.2";
|
|
||||||
document.getElementById("dispLighthouse").textContent = data.server_vpn_ip || "10.42.0.1";
|
|
||||||
|
|
||||||
const domain = data.base_domain;
|
|
||||||
if (data.server_url) {
|
|
||||||
document.getElementById("subDrive").textContent = `${data.server_url}/#drive`;
|
|
||||||
document.getElementById("cardDrive").href = `${data.server_url}/#drive`;
|
|
||||||
|
|
||||||
document.getElementById("subMail").textContent = `${data.server_url}/#mail`;
|
|
||||||
document.getElementById("cardMail").href = `${data.server_url}/#mail`;
|
|
||||||
|
|
||||||
document.getElementById("subChat").textContent = `${data.server_url}/#chat`;
|
|
||||||
document.getElementById("cardChat").href = `${data.server_url}/#chat`;
|
|
||||||
|
|
||||||
document.getElementById("subWeb").textContent = data.server_url;
|
|
||||||
document.getElementById("cardWeb").href = data.server_url;
|
|
||||||
} else {
|
|
||||||
document.getElementById("subDrive").textContent = `http://drive.${domain}`;
|
|
||||||
document.getElementById("cardDrive").href = `http://drive.${domain}`;
|
|
||||||
|
|
||||||
document.getElementById("subMail").textContent = `http://mail.${domain}`;
|
|
||||||
document.getElementById("cardMail").href = `http://mail.${domain}`;
|
|
||||||
|
|
||||||
document.getElementById("subChat").textContent = `http://chat.${domain}`;
|
|
||||||
document.getElementById("cardChat").href = `http://chat.${domain}`;
|
|
||||||
|
|
||||||
document.getElementById("subWeb").textContent = `http://${domain}`;
|
|
||||||
document.getElementById("cardWeb").href = `http://${domain}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function submitPairing(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
let serverUrl = document.getElementById("serverUrl").value.trim();
|
|
||||||
const username = document.getElementById("pairUser").value.trim();
|
|
||||||
const password = document.getElementById("pairPass").value;
|
|
||||||
|
|
||||||
if (!serverUrl.startsWith("http://") && !serverUrl.startsWith("https://")) {
|
|
||||||
serverUrl = "http://" + serverUrl;
|
|
||||||
}
|
|
||||||
serverUrl = serverUrl.replace(/\/+$/, "");
|
|
||||||
|
|
||||||
const btn = document.getElementById("btnPair");
|
|
||||||
btn.disabled = true;
|
|
||||||
btn.textContent = i18n[currentLang].pairing_in_progress;
|
|
||||||
|
|
||||||
if (window.location.protocol === "file:") {
|
|
||||||
try {
|
|
||||||
const res = await fetch(`${serverUrl}/api/pair`, {
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({ username, password })
|
|
||||||
});
|
|
||||||
const data = await res.json();
|
|
||||||
if (!res.ok) {
|
|
||||||
alert((currentLang === "de" ? "Kopplung fehlgeschlagen: " : "Pairing failed: ") + (data.error || "Serverfehler"));
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const prof = {
|
|
||||||
paired: true,
|
|
||||||
server_url: serverUrl,
|
|
||||||
username: data.username || username,
|
|
||||||
base_domain: data.base_domain || "intern",
|
|
||||||
overlay_ip: data.overlay_ip || "10.42.0.2",
|
|
||||||
server_vpn_ip: data.server_vpn_ip || "10.42.0.1",
|
|
||||||
session_token: data.session_token
|
|
||||||
};
|
|
||||||
localStorage.setItem("benzcloud_profile", JSON.stringify(prof));
|
|
||||||
clientProfile = prof;
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
showConnectedView(prof);
|
|
||||||
} catch (err) {
|
|
||||||
alert((currentLang === "de" ? "Netzwerkfehler: " : "Network error: ") + err);
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const res = await fetch("/api/pair", {
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({ server_url: serverUrl, username, password })
|
|
||||||
});
|
|
||||||
const data = await res.json();
|
|
||||||
if (!res.ok) {
|
|
||||||
alert((currentLang === "de" ? "Kopplung fehlgeschlagen: " : "Pairing failed: ") + (data.error || "Serverfehler"));
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fetchClientProfile();
|
|
||||||
} catch (err) {
|
|
||||||
alert((currentLang === "de" ? "Netzwerkfehler: " : "Network error: ") + err);
|
|
||||||
btn.disabled = false;
|
|
||||||
btn.textContent = i18n[currentLang].btn_pair;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function unpairClient() {
|
|
||||||
if (!confirm(i18n[currentLang].confirm_unpair)) return;
|
|
||||||
if (window.location.protocol === "file:") {
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
clientProfile = null;
|
|
||||||
showPairingView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
await fetch("/api/unpair", { method: "POST" });
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
fetchClientProfile();
|
|
||||||
} catch (err) {
|
|
||||||
localStorage.removeItem("benzcloud_profile");
|
|
||||||
showPairingView();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BIN
web/icon.png
|
Before Width: | Height: | Size: 52 KiB |
81
web/icon.svg
@ -1,81 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
||||||
<stop offset="0%" stop-color="#0a0d1c"/>
|
|
||||||
<stop offset="100%" stop-color="#141933"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="indigoGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
||||||
<stop offset="0%" stop-color="#818cf8"/>
|
|
||||||
<stop offset="100%" stop-color="#4f46e5"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="cyanPulse" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
||||||
<stop offset="0%" stop-color="#38bdf8"/>
|
|
||||||
<stop offset="100%" stop-color="#6366f1"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="screenGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
||||||
<stop offset="0%" stop-color="#1e1b4b"/>
|
|
||||||
<stop offset="100%" stop-color="#0f172a"/>
|
|
||||||
</linearGradient>
|
|
||||||
<filter id="glow" x="-20%" y="-20%" width="140%" height="140%">
|
|
||||||
<feGaussianBlur stdDeviation="10" result="blur"/>
|
|
||||||
<feComposite in="SourceGraphic" in2="blur" operator="over"/>
|
|
||||||
</filter>
|
|
||||||
</defs>
|
|
||||||
|
|
||||||
<!-- Background rounded squircle -->
|
|
||||||
<rect x="24" y="24" width="464" height="464" rx="108" fill="url(#bgGrad)" stroke="#253354" stroke-width="8"/>
|
|
||||||
|
|
||||||
<!-- Desktop Cockpit Monitor Body -->
|
|
||||||
<rect x="88" y="96" width="288" height="196" rx="20" fill="url(#screenGrad)" stroke="url(#indigoGrad)" stroke-width="10" filter="url(#glow)"/>
|
|
||||||
|
|
||||||
<!-- Monitor Stand Base -->
|
|
||||||
<path d="M 206 296 L 194 340 L 270 340 L 258 296" fill="#1e1b4b" stroke="#4f46e5" stroke-width="6" stroke-linejoin="round"/>
|
|
||||||
<rect x="170" y="340" width="124" height="14" rx="7" fill="#4f46e5"/>
|
|
||||||
|
|
||||||
<!-- QR Pairing Matrix on Monitor Screen -->
|
|
||||||
<!-- Outer marker 1 (top-left) -->
|
|
||||||
<rect x="118" y="126" width="38" height="38" rx="6" fill="none" stroke="#818cf8" stroke-width="6"/>
|
|
||||||
<rect x="127" y="135" width="20" height="20" rx="3" fill="#818cf8"/>
|
|
||||||
|
|
||||||
<!-- Outer marker 2 (top-right) -->
|
|
||||||
<rect x="188" y="126" width="38" height="38" rx="6" fill="none" stroke="#818cf8" stroke-width="6"/>
|
|
||||||
<rect x="197" y="135" width="20" height="20" rx="3" fill="#818cf8"/>
|
|
||||||
|
|
||||||
<!-- Outer marker 3 (bottom-left) -->
|
|
||||||
<rect x="118" y="196" width="38" height="38" rx="6" fill="none" stroke="#818cf8" stroke-width="6"/>
|
|
||||||
<rect x="127" y="205" width="20" height="20" rx="3" fill="#818cf8"/>
|
|
||||||
|
|
||||||
<!-- QR bit elements -->
|
|
||||||
<rect x="188" y="196" width="16" height="16" rx="3" fill="#38bdf8"/>
|
|
||||||
<rect x="210" y="218" width="16" height="16" rx="3" fill="#818cf8"/>
|
|
||||||
<rect x="166" y="166" width="16" height="16" rx="3" fill="#818cf8"/>
|
|
||||||
<rect x="188" y="174" width="16" height="16" rx="3" fill="#38bdf8"/>
|
|
||||||
<rect x="136" y="174" width="16" height="16" rx="3" fill="#6366f1"/>
|
|
||||||
|
|
||||||
<!-- Cockpit Telemetry lines on right side of screen -->
|
|
||||||
<line x1="250" y1="136" x2="346" y2="136" stroke="#4ade80" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<line x1="250" y1="162" x2="330" y2="162" stroke="#38bdf8" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<line x1="250" y1="188" x2="310" y2="188" stroke="#818cf8" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<line x1="250" y1="214" x2="340" y2="214" stroke="#a78bfa" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<line x1="250" y1="240" x2="290" y2="240" stroke="#f43f5e" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
|
|
||||||
<!-- Connected Mobile Companion Device (Overlapping Bottom Right) -->
|
|
||||||
<g filter="url(#glow)">
|
|
||||||
<rect x="306" y="226" width="124" height="216" rx="28" fill="#090d1c" stroke="url(#cyanPulse)" stroke-width="8"/>
|
|
||||||
<!-- Mobile Screen -->
|
|
||||||
<rect x="318" y="248" width="100" height="164" rx="16" fill="#141a33"/>
|
|
||||||
<!-- Mobile Speaker notch -->
|
|
||||||
<circle cx="368" cy="237" r="3.5" fill="#38bdf8"/>
|
|
||||||
<!-- Mobile mini QR glyph -->
|
|
||||||
<rect x="342" y="278" width="52" height="52" rx="8" fill="none" stroke="#38bdf8" stroke-width="5"/>
|
|
||||||
<rect x="355" y="291" width="26" height="26" rx="4" fill="#38bdf8"/>
|
|
||||||
<!-- Signal waves radiating from mobile -->
|
|
||||||
<path d="M 346 364 C 360 354 376 354 390 364" fill="none" stroke="#4ade80" stroke-width="5" stroke-linecap="round"/>
|
|
||||||
<path d="M 338 378 C 358 366 378 366 398 378" fill="none" stroke="#4ade80" stroke-width="5" stroke-linecap="round"/>
|
|
||||||
<!-- Verified connection node badge -->
|
|
||||||
<circle cx="368" cy="428" r="5" fill="#4ade80"/>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<!-- Dynamic Connection Wave from Monitor to Mobile -->
|
|
||||||
<path d="M 230 260 C 270 260 275 310 310 310" fill="none" stroke="#38bdf8" stroke-width="6" stroke-dasharray="6,6"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 4.4 KiB |
129
web/index.html
@ -1,129 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de" data-theme="dark">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self'; frame-src 'none'; object-src 'none'; base-uri 'self';">
|
|
||||||
<meta http-equiv="X-Content-Type-Options" content="nosniff">
|
|
||||||
<meta name="referrer" content="strict-origin-when-cross-origin">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>BenzCloud Client – Desktop & Mobile</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header class="app-header">
|
|
||||||
<div class="header-left">
|
|
||||||
<div class="logo-icon">☁️</div>
|
|
||||||
<div class="logo-text">
|
|
||||||
<span class="brand-title">BenzCloud Client</span>
|
|
||||||
<span class="brand-badge">v1.0</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="header-right">
|
|
||||||
<div class="lang-switcher">
|
|
||||||
<button id="langDE" class="btn-lang active" onclick="setLanguage('de')">DE</button>
|
|
||||||
<button id="langEN" class="btn-lang" onclick="setLanguage('en')">EN</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="main-content">
|
|
||||||
<!-- PAIRING VIEW -->
|
|
||||||
<div id="pairingView" class="view-panel" style="display:none;">
|
|
||||||
<div class="card-box">
|
|
||||||
<div class="badge-pill" data-i18n="pair_badge">🔗 Client-Ersteinrichtung</div>
|
|
||||||
<h1 class="title" data-i18n="pair_title">Mit BenzCloud-Server verbinden</h1>
|
|
||||||
<p class="desc" data-i18n="pair_desc">Gib die lokale IP-Adresse deines BenzCloud-Servers und deine Anmeldedaten ein. Das Mesh-VPN (Nebula) und der DNS-Server konfigurieren sich automatisch.</p>
|
|
||||||
|
|
||||||
<form id="pairForm" onsubmit="submitPairing(event)">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="serverUrl" data-i18n="lbl_server_url">Server LAN-Adresse:</label>
|
|
||||||
<input type="text" id="serverUrl" required placeholder="z. B. http://192.168.0.5:8080" value="http://127.0.0.1:8080">
|
|
||||||
</div>
|
|
||||||
<div class="form-row">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="pairUser" data-i18n="lbl_user">Benutzername:</label>
|
|
||||||
<input type="text" id="pairUser" required placeholder="admin" value="admin">
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="pairPass" data-i18n="lbl_pass">Passwort:</label>
|
|
||||||
<input type="password" id="pairPass" required placeholder="••••••••">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="btn-primary btn-block" id="btnPair" data-i18n="btn_pair">🚀 Gerät sicher koppeln & verbinden</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- CONNECTED COCKPIT -->
|
|
||||||
<div id="connectedView" class="view-panel" style="display:none;">
|
|
||||||
<div class="status-banner">
|
|
||||||
<div class="s-left">
|
|
||||||
<span class="pulse-dot"></span>
|
|
||||||
<div>
|
|
||||||
<h2 data-i18n="status_connected">Verbunden mit BenzCloud</h2>
|
|
||||||
<p class="s-domain" id="dispDomain">benzjeremy.de</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="s-right">
|
|
||||||
<div class="tag-row">
|
|
||||||
<span class="badge-tag">Overlay IP: <strong id="dispOverlayIP">10.42.0.2</strong></span>
|
|
||||||
<span class="badge-tag">Lighthouse: <strong id="dispLighthouse">10.42.0.1</strong></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3 class="section-title" data-i18n="services_heading">Deine Enterprise-Dienste (Direktzugriff)</h3>
|
|
||||||
<div class="grid-services">
|
|
||||||
<a class="service-card" id="cardDrive" href="#" target="_blank">
|
|
||||||
<div class="s-icon">📁</div>
|
|
||||||
<div class="s-details">
|
|
||||||
<h4 data-i18n="card_drive_title">BenzCloud Drive</h4>
|
|
||||||
<p class="s-sub" id="subDrive">http://drive.domain</p>
|
|
||||||
<p class="s-desc" data-i18n="card_drive_desc">Dateien hochladen, teilen und synchronisieren.</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a class="service-card" id="cardMail" href="#" target="_blank">
|
|
||||||
<div class="s-icon">📧</div>
|
|
||||||
<div class="s-details">
|
|
||||||
<h4 data-i18n="card_mail_title">BenzCloud Mail</h4>
|
|
||||||
<p class="s-sub" id="subMail">http://mail.domain</p>
|
|
||||||
<p class="s-desc" data-i18n="card_mail_desc">Internes Webmail & Thunderbird-kompatibles Postfach.</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a class="service-card" id="cardChat" href="#" target="_blank">
|
|
||||||
<div class="s-icon">💬</div>
|
|
||||||
<div class="s-details">
|
|
||||||
<h4 data-i18n="card_chat_title">BenzCloud Chat</h4>
|
|
||||||
<p class="s-sub" id="subChat">http://chat.domain</p>
|
|
||||||
<p class="s-desc" data-i18n="card_chat_desc">Echtzeit-Teamkommunikation & Direktnachrichten.</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a class="service-card" id="cardWeb" href="#" target="_blank">
|
|
||||||
<div class="s-icon">🌐</div>
|
|
||||||
<div class="s-details">
|
|
||||||
<h4 data-i18n="card_web_title">Webseiten & Portal</h4>
|
|
||||||
<p class="s-sub" id="subWeb">http://domain</p>
|
|
||||||
<p class="s-desc" data-i18n="card_web_desc">Gehostete Firmen- und Team-Webseiten aufrufen.</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="client-footer-actions">
|
|
||||||
<button class="btn-outline btn-sm" onclick="unpairClient()" data-i18n="btn_unpair">🔌 Entkoppeln / Gerät trennen</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="app-footer">
|
|
||||||
<span>BenzCloud Client © 2026 Jeremy Benz • GNU GPLv3 Lizenz • Nebula (MIT)</span>
|
|
||||||
<span class="pill-pre">Pre-Release / In aktiver Entwicklung</span>
|
|
||||||
<div class="routing-notice" style="text-align: center; padding: 1rem; font-size: 0.75rem; opacity: 0.5; font-family: monospace;">2-Tier Routing: /benzcloud-client/ (Landing) | /benzcloud-client/app/ (Web-App)</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script src="app.js"></script>
|
|
||||||
<section class="cta-section" style="margin: 3rem 0; text-align: center; font-family: sans-serif;"><div style="background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 12px; padding: 2rem; display: inline-block; max-width: 90%;"><h3 style="margin-top: 0; color: #f59e0b;">Zentrale App-Zentrale</h3><p style="margin-bottom: 1.5rem; opacity: 0.8;">Alle meine Apps und Projekte an einem Ort.</p><a class="btn-benzstore" href="https://benzjeremy.github.io/benzstore/" target="_blank" rel="noopener noreferrer" style="background: #f59e0b; color: #fff; padding: 12px 28px; border-radius: 8px; text-decoration: none; font-weight: bold; display: inline-block; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);">🚀 BenzStore entdecken</a></div></section>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
300
web/style.css
@ -1,300 +0,0 @@
|
|||||||
:root {
|
|
||||||
--bg-page: #0a0e17;
|
|
||||||
--bg-surface: #121826;
|
|
||||||
--bg-card: #182032;
|
|
||||||
--bg-hover: #1e293f;
|
|
||||||
--border-subtle: #243048;
|
|
||||||
--border-focus: #38bdf8;
|
|
||||||
|
|
||||||
--text-main: #f1f5f9;
|
|
||||||
--text-muted: #94a3b8;
|
|
||||||
--text-subtle: #64748b;
|
|
||||||
|
|
||||||
--accent-blue: #38bdf8;
|
|
||||||
--accent-blue-hover: #0284c7;
|
|
||||||
--accent-green: #34d399;
|
|
||||||
--accent-amber: #fbbf24;
|
|
||||||
|
|
||||||
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
||||||
--font-mono: "JetBrains Mono", monospace;
|
|
||||||
--radius-sm: 6px;
|
|
||||||
--radius-md: 12px;
|
|
||||||
--radius-lg: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: var(--bg-page);
|
|
||||||
color: var(--text-main);
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-header {
|
|
||||||
background-color: var(--bg-surface);
|
|
||||||
border-bottom: 1px solid var(--border-subtle);
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-left {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-icon { font-size: 1.5rem; }
|
|
||||||
.brand-title { font-weight: 700; font-size: 1.2rem; }
|
|
||||||
.brand-badge {
|
|
||||||
background-color: rgba(56, 189, 248, 0.15);
|
|
||||||
color: var(--accent-blue);
|
|
||||||
border: 1px solid rgba(56, 189, 248, 0.3);
|
|
||||||
font-size: 0.75rem;
|
|
||||||
padding: 0.15rem 0.45rem;
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-switcher {
|
|
||||||
display: flex;
|
|
||||||
background-color: var(--bg-card);
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
overflow: hidden;
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-lang {
|
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
color: var(--text-muted);
|
|
||||||
padding: 0.3rem 0.6rem;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.btn-lang.active {
|
|
||||||
background-color: var(--accent-blue);
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-content {
|
|
||||||
flex: 1;
|
|
||||||
max-width: 900px;
|
|
||||||
width: 100%;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2rem 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-box {
|
|
||||||
background-color: var(--bg-surface);
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
border-radius: var(--radius-lg);
|
|
||||||
padding: 2.5rem;
|
|
||||||
margin: 2rem auto;
|
|
||||||
max-width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge-pill {
|
|
||||||
display: inline-block;
|
|
||||||
background-color: rgba(56, 189, 248, 0.15);
|
|
||||||
color: var(--accent-blue);
|
|
||||||
border: 1px solid rgba(56, 189, 248, 0.3);
|
|
||||||
font-size: 0.8rem;
|
|
||||||
font-weight: 600;
|
|
||||||
padding: 0.2rem 0.6rem;
|
|
||||||
border-radius: 9999px;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 1.8rem;
|
|
||||||
font-weight: 800;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
|
||||||
color: var(--text-muted);
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-row {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
display: block;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 0.35rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"], input[type="password"] {
|
|
||||||
width: 100%;
|
|
||||||
background-color: var(--bg-card);
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
color: var(--text-main);
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"]:focus, input[type="password"]:focus {
|
|
||||||
outline: none;
|
|
||||||
border-color: var(--border-focus);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: var(--accent-blue);
|
|
||||||
color: #04101d;
|
|
||||||
font-weight: 700;
|
|
||||||
border: none;
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
padding: 0.85rem 1.5rem;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.btn-primary:hover { background-color: var(--accent-blue-hover); }
|
|
||||||
|
|
||||||
.btn-block { width: 100%; }
|
|
||||||
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
|
|
||||||
.btn-outline {
|
|
||||||
background: transparent;
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
color: var(--text-muted);
|
|
||||||
cursor: pointer;
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Connected View */
|
|
||||||
.status-banner {
|
|
||||||
background-color: var(--bg-surface);
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
border-radius: var(--radius-md);
|
|
||||||
padding: 1.5rem;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.s-left {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pulse-dot {
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: var(--accent-green);
|
|
||||||
box-shadow: 0 0 10px var(--accent-green);
|
|
||||||
}
|
|
||||||
|
|
||||||
.s-domain {
|
|
||||||
font-family: var(--font-mono);
|
|
||||||
color: var(--accent-blue);
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag-row {
|
|
||||||
display: flex;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge-tag {
|
|
||||||
background-color: var(--bg-card);
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
padding: 0.35rem 0.7rem;
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
font-size: 0.8rem;
|
|
||||||
font-family: var(--font-mono);
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-title {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid-services {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
||||||
gap: 1rem;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.service-card {
|
|
||||||
background-color: var(--bg-surface);
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
border-radius: var(--radius-md);
|
|
||||||
padding: 1.25rem;
|
|
||||||
display: flex;
|
|
||||||
gap: 1rem;
|
|
||||||
text-decoration: none;
|
|
||||||
color: var(--text-main);
|
|
||||||
transition: all 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.service-card:hover {
|
|
||||||
border-color: var(--border-focus);
|
|
||||||
background-color: var(--bg-hover);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.s-icon { font-size: 2rem; }
|
|
||||||
|
|
||||||
.s-details h4 {
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 0.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.s-sub {
|
|
||||||
font-family: var(--font-mono);
|
|
||||||
color: var(--accent-blue);
|
|
||||||
font-size: 0.75rem;
|
|
||||||
margin-bottom: 0.35rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.s-desc {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
color: var(--text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.client-footer-actions {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-footer {
|
|
||||||
border-top: 1px solid var(--border-subtle);
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
color: var(--text-subtle);
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-top: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pill-pre {
|
|
||||||
background-color: rgba(251, 191, 36, 0.12);
|
|
||||||
color: var(--accent-amber);
|
|
||||||
border: 1px solid rgba(251, 191, 36, 0.3);
|
|
||||||
padding: 0.15rem 0.5rem;
|
|
||||||
border-radius: 9999px;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
}
|
|
||||||