From 5c89cc6d4e50a0e52ccfc0d3c185d5b14558521b Mon Sep 17 00:00:00 2001 From: Nicola Belluti Date: Thu, 23 Jan 2025 10:43:17 +0100 Subject: [PATCH 1/5] Compile the MSIs and DMGs when `appname` has whitespaces --- .github/workflows/generator-macos.yml | 1 + .github/workflows/generator-windows.yml | 4 ++-- .github/workflows/pre137-generator-macos.yml | 1 + .github/workflows/pre137-generator-windows.yml | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generator-macos.yml b/.github/workflows/generator-macos.yml index 9ccbf3e..97e5ceb 100644 --- a/.github/workflows/generator-macos.yml +++ b/.github/workflows/generator-macos.yml @@ -534,6 +534,7 @@ jobs: sed -i -e "s/osx_minimum_system_version = \"[0-9]*.[0-9]*\"/osx_minimum_system_version = \"${MIN_MACOS_VERSION}\"/" Cargo.toml sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj fi + sed -i -e "s/RustDesk.app/\"${{ inputs.appname }}.app\"/" build.py ./build.py --flutter --hwcodec ${{ matrix.job.extra-build-args }} - name: Report Status diff --git a/.github/workflows/generator-windows.yml b/.github/workflows/generator-windows.yml index 2e5e3be..d06cc19 100644 --- a/.github/workflows/generator-windows.yml +++ b/.github/workflows/generator-windows.yml @@ -535,9 +535,9 @@ jobs: continue-on-error: true if: env.UPLOAD_ARTIFACT == 'true' run: | + $myappname = "${{ inputs.appname }}" -replace '\s','_' + cp "rustdesk/${{ inputs.appname }}.exe" "rustdesk/${myappname}.exe" pushd ./res/msi - $myappname = "${{ inputs.appname }}" - $myappname = $myappname -replace '\s','_' python preprocess.py --app-name "$myappname" --arp -d ../../rustdesk nuget restore msi.sln msbuild msi.sln -p:Configuration=Release -p:Platform=x64 /p:TargetVersion=Windows10 diff --git a/.github/workflows/pre137-generator-macos.yml b/.github/workflows/pre137-generator-macos.yml index 232c85f..85db444 100644 --- a/.github/workflows/pre137-generator-macos.yml +++ b/.github/workflows/pre137-generator-macos.yml @@ -532,6 +532,7 @@ jobs: sed -i -e "s/osx_minimum_system_version = \"[0-9]*.[0-9]*\"/osx_minimum_system_version = \"${MIN_MACOS_VERSION}\"/" Cargo.toml sed -i -e "s/MACOSX_DEPLOYMENT_TARGET = [0-9]*.[0-9]*;/MACOSX_DEPLOYMENT_TARGET = ${MIN_MACOS_VERSION};/" flutter/macos/Runner.xcodeproj/project.pbxproj fi + sed -i -e "s/RustDesk.app/\"${{ inputs.appname }}.app\"/" build.py ./build.py --flutter --hwcodec ${{ matrix.job.extra-build-args }} - name: Report Status diff --git a/.github/workflows/pre137-generator-windows.yml b/.github/workflows/pre137-generator-windows.yml index 14c6819..27ae99e 100644 --- a/.github/workflows/pre137-generator-windows.yml +++ b/.github/workflows/pre137-generator-windows.yml @@ -533,9 +533,9 @@ jobs: continue-on-error: true if: env.UPLOAD_ARTIFACT == 'true' run: | + $myappname = "${{ inputs.appname }}" -replace '\s','_' + cp "rustdesk/${{ inputs.appname }}.exe" "rustdesk/${myappname}.exe" pushd ./res/msi - $myappname = "${{ inputs.appname }}" - $myappname = $myappname -replace '\s','_' python preprocess.py --app-name "$myappname" --arp -d ../../rustdesk nuget restore msi.sln msbuild msi.sln -p:Configuration=Release -p:Platform=x64 /p:TargetVersion=Windows10 From 83990d61c5d007da1c8d0b04d6f2c5bb4fb47152 Mon Sep 17 00:00:00 2001 From: Nicola Belluti Date: Thu, 23 Jan 2025 10:53:29 +0100 Subject: [PATCH 2/5] Removed .pyc files --- rdgen/__pycache__/__init__.cpython-312.pyc | Bin 143 -> 0 bytes rdgen/__pycache__/settings.cpython-312.pyc | Bin 2484 -> 0 bytes rdgen/__pycache__/urls.cpython-312.pyc | Bin 1428 -> 0 bytes rdgen/__pycache__/wsgi.cpython-312.pyc | Bin 627 -> 0 bytes rdgenerator/__pycache__/__init__.cpython-312.pyc | Bin 149 -> 0 bytes rdgenerator/__pycache__/admin.cpython-312.pyc | Bin 193 -> 0 bytes rdgenerator/__pycache__/apps.cpython-312.pyc | Bin 465 -> 0 bytes rdgenerator/__pycache__/models.cpython-312.pyc | Bin 190 -> 0 bytes rdgenerator/__pycache__/views.cpython-312.pyc | Bin 2720 -> 0 bytes 9 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 rdgen/__pycache__/__init__.cpython-312.pyc delete mode 100644 rdgen/__pycache__/settings.cpython-312.pyc delete mode 100644 rdgen/__pycache__/urls.cpython-312.pyc delete mode 100644 rdgen/__pycache__/wsgi.cpython-312.pyc delete mode 100644 rdgenerator/__pycache__/__init__.cpython-312.pyc delete mode 100644 rdgenerator/__pycache__/admin.cpython-312.pyc delete mode 100644 rdgenerator/__pycache__/apps.cpython-312.pyc delete mode 100644 rdgenerator/__pycache__/models.cpython-312.pyc delete mode 100644 rdgenerator/__pycache__/views.cpython-312.pyc diff --git a/rdgen/__pycache__/__init__.cpython-312.pyc b/rdgen/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index dc95201ecf908e1e005afd58a731f86b9ade7cda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 143 zcmX@j%ge<81XiE-r-A6lAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdrRQuF6Iz^FR2-93 zRGF9;WF;ydt(*|i;TB02xvZRVq+!96!O7}{pO_2&o zB{3)MUAnbHrffz2M2Bu&VswbX$v~$99pnUEGWC#>Y(e(m3KDtmIp_P%;djry)E}`J zMZo95@4q!ajS<9O&Sdln3ixgrg zD#TF?#c=>lSrLLjiB}$(6sFKLN7FOwwuI=K6$xze=R=yhOhYdWT770BC?DQhYXUvo!>bh3i)Kz2;+ zm}bX#kjWseVK9RnqY4^YJA>5>5N1rRBR7o9sNBqe-rT`-v#ThyA{!>HHBTQ$QV}G= zvQ9sjlrA>@Pc9ud#}fVRtZ16FePzkqvDStv$f|)GT^%pa-!hlyn+vP01w+5F-$WRF zdF$nlly2SrYJRn$OBh=}G&;AJZq_aF{&Tdqx>8LCt<->qX=tjc%XP*T)w(ok?Lx+D z6GjJuRny$>V8fc7a2nV!K<2ZKHaMgfAg)d#OjwwPvmAyUaT~x{a!pSMtmR>7TSiF1 zFC-l^?nBGwKEpdt4};AUpY{19^RO0X49^d2W2p4mB(UslO=Ys~Z7lTuL;?xq87F69 z4$8<4x7Eggla-Cc7zb|-1R6uFo>Q43H}-a=#vZgg^WC~GwQ;HA^tCaDqg)l4uC5qX zX2@aUc1MAo#MA+dRW#~!Cg*Od>dr$1yA#1D8lD3f`O-c+xW;CmaK)VM%jGM)9b(I6(H#X# z!`ooA|CpfpIuad+Y#L+{hO> z+gD^aIXw#d)_Ocqw%aou$uM4MIuhY*kdd2?sTo*jO=mN9P0Y(}S&^LnemaQIbnDSY znKorrZg<-SthUUZQ~cK##Si+vJgo7Q;G2sQ6uWJ#%Z;-PeylEc4cl9*X00Hc;ILIP z)+a++P_nHdtQgFi+=8v7t;<+J#q_Kl6h%0kMbQp+;0RRYy6y#O?T{!s$A)9qv7sr? zu^s5ZA)%UfXpQALXPs?|=du;9Dn8-9xBWS8t+rvu*g~PS#pT4uCBDkr@qCf5f(Z=J z9K20!=5x6Mx5ZXCJ6b7~s$#8D$d-!hcDTxImJ4i^Cjvpm05s^r9{Y#|TM60~2ez!o=Z>;@-hOF0e*^P8L~l%QooH7Gd0@twf+Ic}Y;6{;dIm&ElvSIGTJd~jY2ADQffZKrpP?Yh1%soObh?7_=w z+wJP%b@bL^I{P0(4?*Rwf*J^#}Uic+Ara_h}+^=Pi){R)733$s8u; zetCG1SUmQ76A~*LNa{C0i~j&xZ8${$ diff --git a/rdgen/__pycache__/urls.cpython-312.pyc b/rdgen/__pycache__/urls.cpython-312.pyc deleted file mode 100644 index b58eab859406d02342c0c821f0015e4e9f6a559c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1428 zcmb7Ezi-?&7$r}-JDo26ks(GJXCTlYXE~0P6wPvI0|ZWk1}HkT^>R2^ktN=p&Jrn* zx+FHTbjz4b&X~2xKhZr)t~a>V(4{DfZV5aTaF>4MNr_z`Xu^TwM?OBj@9`6#FD%#y z+CP8)G$1BIzpJ2X&2n(Gj1f9O5$d4`N3{g^Fno=qmKr?+BZ|jXwdKus+x3|9inuMGU;^9ODdCVCZa6v>gq>N;O zk7<~@w*CExk~)&!Q>s1#4;y>PjV^=a7dDKayO>;q)ToALCOUsF$1o2&YC4O zkd#PDyEcI~%JWQiJul*+bfa;=hP*m1M=GWmW!z+;`c0-%;&T4lO zKJ>uA>ZFdE(7YYTvHwyv`i+B&y7uE3y9NFX!lt0U^4_Tx252an<@SAh8>*5*nR2n; zs>XDGX*(RzaMy=o^9ON4VJ+hKSi*zISuUEs4>jidMPr^;(bmO1rx6B7DB8Y%mkJ5R z53st-k~lBgCrl6xKneAn6wBqbvQ#G`)Z0-kz80phrLfAF7K^8~6;>s!XrHLIAJGxe zpyTz;ZhuRHmi~^|3t0aqmAmi{^tI%&SJ&cZd&k!2DUT)zy)M+Fp&lmr0J@h3#`slj z37ba*;l)4DC%+i2L*v}kICp5QPL0(kn=^wvJv%i%eEQwb#@cV@`k$uzs)6d(!-Yrm zaAkeEvOY5}{c1KJo_RzM*kd*`KZfXqb>Ydi!&Ps(>dnk6^X09B?Z?|Q^P`uo`cmzO Iwop&pzjYXz1ONa4 diff --git a/rdgen/__pycache__/wsgi.cpython-312.pyc b/rdgen/__pycache__/wsgi.cpython-312.pyc deleted file mode 100644 index f711d6bd1d6b468f4c8f514ea3e3ab420d1a5367..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 627 zcmYjP&2AGh5Vm(iQ*CI35bfDQT!LUX9JoXXQIQe_L3&6lq$twHSx+__y!Og=Q_@>c zJOBrt0reqx04_yj`gu)Xrh%8;@tcZ!CY>+VYUK#{A>x9Y*L^k*uw> z0`s8-?-4^i#4vL>?qM5U?xb$d#R%|ZbKPU>UAia`DeUk>lTpIq9?<~a*qBT= zf`G|L`)oo*EZ3SMnFb(&hkiX6%VQ%01{s&L6od(mb({p=pJK^Q4d=IFFkx{PUXhXS zG@tKwTKi#l@8F=_X?4Sw`_01_dneV!?!E?N5)tcKIWLEy6%dBGBXxdbDZ`JfdcPQ| zTuYOeK}-`RMef-~1|xdJOg_MpJEs+O-8TIPuWY S1ma>4<0CU8BV!RWkOctB03@6M diff --git a/rdgenerator/__pycache__/admin.cpython-312.pyc b/rdgenerator/__pycache__/admin.cpython-312.pyc deleted file mode 100644 index 330d91a1fa939170a9b87d7fd690e46edc7fdf21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 193 zcmX@j%ge<81e*H}q&WfU#~=<2FhLog1%Qm{3@HpLj5!Rsj8Tk?43$ip%r8OGnvAzt z6H{_C^ZYcKZtm}#sl@w(r6)^)9tYr8MQuoWy*(xTqIJKxaCaI`0F)zj? zwK%&ZzaXY4B|S9{LZ%iamgE=3fQ{2DsQkrYlbfGXnv-f*!~ryc5r~UHj1SC=jEwgf J6pGk@901~UF>C+; diff --git a/rdgenerator/__pycache__/apps.cpython-312.pyc b/rdgenerator/__pycache__/apps.cpython-312.pyc deleted file mode 100644 index 3f1108e97ab8d2e18cf8a03210eb956ef392dc43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 465 zcmYLFze~eF6n>Ya(x0LtVh0BoAxm%+5uvu|)JehSMh%k zcNfPJaB^}Js!J#DauIL%-uLdk@7=rawbN;WJofX8{~+UsO8!o*B8xpqWgz@$HAp8YeZGD*py@j3|vIPH7IgTYPeQz z+E%fCP6HM(PSTj`5w|<^ibO%|(2+BVDGP;jG7frK8lR3?NQ)N#R}Af1QO7tU6NYio z#8?WlQ1Ld#HyH`5$_8aV$-)#9IR^XX981+6VWE~>?)MM93&FVXMm#5xH(=sAjT5hY zOQYV=BS|8hBIlT=ihm>1)cTAW>y zUl3E2lAf9eAybPIOY)0iAV%pGRQ}?y0kTVTQtgU3fJQI^aWRPTftit!@g9Rr5gU*L E04AF-DgXcg diff --git a/rdgenerator/__pycache__/views.cpython-312.pyc b/rdgenerator/__pycache__/views.cpython-312.pyc deleted file mode 100644 index 6637b7a0c5690f47c8bb7aa56c47d3e820216720..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2720 zcmcImO>7&-6`tWP|0$7{<;1q!TCklsv_#SrqQ-HW0F0zavJ(G9wkiukg%xKgu0-xK zGegs2mJJU%NGHd=NI)GxM+eTqM;&rV&b?4z0TUY~NYPw!Q|tf%bjq70Dak5|)`t$U zkFzuHy_tFMd*AHeJ30ag+Dh*?nZJ4w`j>oZH&?6kY#2Igh#-PCBS>}U2pQPH8nV!$R5{cZrN*H~FmbhySivt~ryQ_z zy?~uc+T-ZQ8L+5CTEs-LIB9(%lTY_=)9nbbe3{kVKifV@){SEm3y>8A*ZJ`xrM|X zgS3|FTjZuujvSnHM##HVW0dtaH#7$>=aR`(>dNE?Z`{79-5Q+W+6UJLKblOo1A0QXTQ6vY?7L!;8*HV>a<)n|p|RtRf7YTF zE@9N$Zp`OQwzz__bMPt^_$G)dYJ`s7dw=!)C!teYp;PNK4_)<8Uv;DrIC8Ilwf{-r zGgX>a6ghscvRYZ6 z+z^ld^pEh{)v;~Wzw+9r*M5{lv;NNG;@3m9TYs)C@vS~l4;E``kx2r7j&x*!Ii&MF zbp8|R5PSk=D_FEy9xY1JJk%Ct&<{1@vi8`w;`%T4du6=u#B#L@x}sPL3qM!X3c(iE z@qRf!H>)0=jk>S45CHYOcMDL`yanV50b$DM$W7a2azK>^rLQiUx?y|hT^%llCb(1w zTuo1YiA`B?Sv%--n~GdUM*^t{qE0CB^wM0$WOGu9#bNdgJbWGmKnZ~G@#@Fxm$$;N zLJlKcYu@`_37GX;8<*;l{_6O4SNGca`{&o<_v0HU>Ro-+iGO;#w!_ChTd18*Jif4* zttCh6;jx-;>_<7c{+Gvr%}ce!a6LRy^Nsv_(j~N=q}QPHe^2^eS}hk*+V{pFswfB2 zr4YDNEc`b_JfADX`@r?3udP{;9}Dnnzhh*nljtl;B92QgjBX*ZId+gTC7TQ$H+h=z1 znW&2$1E=MqZPptG1~)md7w{T(=p^c4=Rt+NCPh?=3m|OOEKq~Vm`C0F_+kCdoCAup z(B+c7ByL*3@e#9R(X&?SxRMyL#={j{W{Fm-pyb$5K7YH$CpuE8b|p z4w6O9STLb*M8P?f9chhlpnm~@Y}QIM3cmw;=Ud3(PzU|adA>jnGMyUP_5Cq#l46d& y!!Cikyu`VTv}l= From 056659f3d41beb28b74ab338518eecd1ceb3b374 Mon Sep 17 00:00:00 2001 From: Nicola Belluti Date: Thu, 23 Jan 2025 10:56:05 +0100 Subject: [PATCH 3/5] Added the SQLite3 database to .gitignore --- .gitignore | 1 + db.sqlite3 | 0 2 files changed, 1 insertion(+) delete mode 100644 db.sqlite3 diff --git a/.gitignore b/.gitignore index 8d17d21..9bad987 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc +db.sqlite3 gunicorn.conf diff --git a/db.sqlite3 b/db.sqlite3 deleted file mode 100644 index e69de29..0000000 From 7e61b075427ae877596e07def050dcb14406dc13 Mon Sep 17 00:00:00 2001 From: Nicola Belluti Date: Thu, 23 Jan 2025 10:59:16 +0100 Subject: [PATCH 4/5] Removed another .pyc --- .../__pycache__/__init__.cpython-312.pyc | Bin 160 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 rdgenerator/migrations/__pycache__/__init__.cpython-312.pyc diff --git a/rdgenerator/migrations/__pycache__/__init__.cpython-312.pyc b/rdgenerator/migrations/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index eb9cc2aa8542b5363b0420e3c8c5e5ac30969f74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 160 zcmX@j%ge<81e*H}q=D$iAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdW$$bi6Iz^FR2-93 zRGF9;#jKmY&$ From 25974bf32c3aa6efa85cd3d74ba7188f8cd5479f Mon Sep 17 00:00:00 2001 From: Nicola Belluti Date: Thu, 23 Jan 2025 11:09:14 +0100 Subject: [PATCH 5/5] Formatted the markdowns and moved the venv in `.venv` --- .gitignore | 1 + README.md | 12 +++-- setup.md | 130 ++++++++++++++++++++++++----------------------------- 3 files changed, 67 insertions(+), 76 deletions(-) diff --git a/.gitignore b/.gitignore index 9bad987..402d3e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pyc db.sqlite3 gunicorn.conf +.venv diff --git a/README.md b/README.md index edf533b..ef55fee 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -## RDGEN is a RustDesk client generator to use with your self-hosted rustdesk server. +# RDGen, a RustDesk client generator to use with your self-hosted RustDesk server -## The client generator is currently hosted [here](https://rdgen.crayoneater.org). If you would like to host the generator yourself, see [here](setup.md) - -## This client generator is currently integrated into my rustdesk [api server](https://github.com/bryangerlach/rustdesk-api-server), which is a fork of [rustdesk-api-server](https://github.com/kingmo888/rustdesk-api-server). If you are running my api server, then you will still need to fork RDGEN and go through the setup process, but you won't need to actually run the rdgen server. +The client generator is currently hosted [here](https://rdgen.crayoneater.org). +If you would like to host the generator yourself, see [here](setup.md) +This client generator is currently integrated into my rustdesk [api +server](https://github.com/bryangerlach/rustdesk-api-server), which is a fork +of [rustdesk-api-server](https://github.com/kingmo888/rustdesk-api-server). If +you are running my api server, then you will still need to fork RDGen and go +through the setup process, but you won't need to actually run the rdgen server. diff --git a/setup.md b/setup.md index 13251a5..b8c8f67 100644 --- a/setup.md +++ b/setup.md @@ -1,92 +1,76 @@ ## To fully host the client generator yourself, you will need to following: -
    -
  1. A Github account with a fork of this repo
  2. -
  3. A Github fine-grained access token with permissions for your rdgen repository -
      -
    • login to your github account
    • -
    • click on your profile picture at the top right, click Settings
    • -
    • at the bottom of the left panel, click Developer Settings
    • -
    • click Personal access tokens
    • -
    • click Fine-grained tokens
    • -
    • click Generate new token
    • -
    • give a token name, change expiration to whatever you want
    • -
    • under Repository acces, select Only select repositories, then pick your rdgen repo
    • -
    • give Read and Write access to actions and workflows
    • -
    -
  4. -
  5. Setup environment variables / secrets: -
      -
    • environment variables on the server running rdgen: -
        -
      • GHUSER="your github username"
      • -
      • GHBEARER="your fine-graned access token"
      • -
    • -
    • github secrets (setup on your github account for your rdgen repo): - -
    • GENURL="example.com:8000"
    • - *this is the domain and port that your are running rdgen on, needs to be accesible on the internet, depending on how you have this setup the port may not be needed -
  6. -
  7. optional github secrets (for signing the code): -
      -
    • WINDOWS_PFX_BASE64
    • -
    • WINDOWS_PFX_PASSWORD
    • -
    • WINDOWS_PFX_SHA1_THUMBPRINT
    • -
  8. - - -
+1. A Github account with a fork of this repo +2. A Github fine-grained access token with permissions for your rdgen + repository: + * login to your github account + * click on your profile picture at the top right, click Settings + * at the bottom of the left panel, click Developer Settings + * click Personal access tokens + * click Fine-grained tokens + * click Generate new token + * give a token name, change expiration to whatever you want + * under Repository access, select Only select repositories, then pick your + rdgen repo + * give Read and Write access to actions and workflows +3. Setup environment variables/secrets: + * environment variables on the server running rdgen: + * GHUSER="your github username" + * GHBEARER="your fine-grained access token" + * github secrets (setup on your github account for your rdgen repo): + * GENURL="example.com:8000" *this is the domain and port that you are + running rdgen on, needs to be accessible on the internet, depending + on how you have this setup the port may not be needed + * optional github secrets (for signing the code): + * WINDOWS_PFX_BASE64 + * WINDOWS_PFX_PASSWORD + * WINDOWS_PFX_SHA1_THUMBPRINT ## To run rdgen on your server: -### open to the directory you want to install rdgen (change /opt to wherever you want) +``` +# Open to the directory you want to install rdgen (change /opt to wherever you want) +cd /opt -> cd /opt +# Clone your rdgen repo, change bryangerlach to your github username +git clone https://github.com/bryangerlach/rdgen.git -### clone your rdgen repo, change bryangerlach to your github username +# Open the rdgen directory +cd rdgen -> git clone https://github.com/bryangerlach/rdgen.git +# Setup a python virtual environment called rdgen +python -m venv .venv -### open the rdgen directory +# Activate the python virtual environment +source .venv/bin/activate -> cd rdgen +# Install the python dependencies +pip install -r requirements.txt -### setup a python virtual environment called rdgen +# Setup the database +python manage.py migrate -> python -m venv rdgen +# Run the server, change 8000 with whatever you want +python manage.py runserver 0.0.0.0:8000 +``` -### activate the python virtual environment +open your web browser to yourdomain:8000 -> source rdgen/bin/activate - -### install the python dependencies - -> pip install -r requirements.txt - -### setup the database - -> python manage.py migrate - -### run the server, change 8000 with whatever you want - -> python manage.py runserver 0.0.0.0:8000 - -### open your web browser to yourdomain:8000 - -### use nginx, caddy, traefik, etc. for ssl reverse proxy +use nginx, caddy, traefik, etc. for ssl reverse proxy ## A few notes: -
    -
  • If you change your repository name, make sure to change the url on lines 161-168 of views.py to reflect the change
  • -
  • If you are running on http instead of https, make sure to make the change on line 70 of views.py
  • -
+* If you change your repository name, make sure to change the url on lines + 161-168 of views.py to reflect the change +* If you are running on http instead of https, make sure to make the change on + line 70 of views.py ## To autostart the server on boot, you can set up a systemd service called rdgen.service -replace user, group, and port if you need to -replace /opt with wherever you have installed rdgen -save the following file as /etc/systemd/system/rdgen.service, and make sure to change GHUSER, GHBEARER +replace user, group, and port if you need to replace /opt with wherever you +have installed rdgen save the following file as +/etc/systemd/system/rdgen.service, and make sure to change GHUSER, GHBEARER + ``` [Unit] Description=Rustdesk Client Generator @@ -96,7 +80,7 @@ LimitNOFILE=1000000 Environment="GHUSER=yourgithubusername" Environment="GHBEARER=yourgithubtoken" PassEnvironment=GHUSER GHBEARER -ExecStart=/opt/rdgen/rdgen/bin/python3 /opt/rdgen/manage.py runserver 0.0.0.0:8000 +ExecStart=/opt/rdgen/.venv/bin/python3 /opt/rdgen/manage.py runserver 0.0.0.0:8000 WorkingDirectory=/opt/rdgen/ User=root Group=root @@ -109,7 +93,9 @@ RestartSec=10 WantedBy=multi-user.target ``` -then run this to enable autostarting the service on boot, and then start it manually this time: +then run this to enable autostarting the service on boot, and then start it +manually this time: + ``` sudo systemctl enable rdgen.service sudo systemctl start rdgen.service @@ -117,4 +103,4 @@ sudo systemctl start rdgen.service and to get the status of the server, run: ``` sudo systemctl status rdgen.service -``` \ No newline at end of file +```