minsk-hackerspace / hackerspace.by

Website of Minsk Hackerspace (Ruby on Rails)
https://hackerspace.by/
11 stars 20 forks source link

WireGuard configs #591

Open jekhor opened 1 year ago

jekhor commented 1 year ago

Add generation of WireGuard configurations for every user. User can download config to import it into WG client. The VPN server can retrieve all peers configurations for active users.

codecov[bot] commented 1 year ago

Codecov Report

Base: 57.94% // Head: 56.91% // Decreases project coverage by -1.02% :warning:

Coverage data is based on head (dbfe569) compared to base (0b913ee). Patch coverage: 41.37% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #591 +/- ## ========================================== - Coverage 57.94% 56.91% -1.03% ========================================== Files 65 67 +2 Lines 1410 1497 +87 ========================================== + Hits 817 852 +35 - Misses 593 645 +52 ``` | [Impacted Files](https://codecov.io/gh/minsk-hackerspace/hackerspace.by/pull/591?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace) | Coverage Δ | | |---|---|---| | [app/models/wg\_config.rb](https://codecov.io/gh/minsk-hackerspace/hackerspace.by/pull/591/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace#diff-YXBwL21vZGVscy93Z19jb25maWcucmI=) | `38.46% <38.46%> (ø)` | | | [app/controllers/wg\_configs\_controller.rb](https://codecov.io/gh/minsk-hackerspace/hackerspace.by/pull/591/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace#diff-YXBwL2NvbnRyb2xsZXJzL3dnX2NvbmZpZ3NfY29udHJvbGxlci5yYg==) | `38.70% <38.70%> (ø)` | | | [app/controllers/hackers\_controller.rb](https://codecov.io/gh/minsk-hackerspace/hackerspace.by/pull/591/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace#diff-YXBwL2NvbnRyb2xsZXJzL2hhY2tlcnNfY29udHJvbGxlci5yYg==) | `64.86% <100.00%> (-0.89%)` | :arrow_down: | | [app/models/ability.rb](https://codecov.io/gh/minsk-hackerspace/hackerspace.by/pull/591/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace#diff-YXBwL21vZGVscy9hYmlsaXR5LnJi) | `91.89% <100.00%> (+0.46%)` | :arrow_up: | | [app/models/user.rb](https://codecov.io/gh/minsk-hackerspace/hackerspace.by/pull/591/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace#diff-YXBwL21vZGVscy91c2VyLnJi) | `66.33% <100.00%> (+0.16%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=minsk-hackerspace)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

yahor commented 1 year ago

@jekhor без вельмі старога гема ipaddress не абйсціся? Можа быць праз рэгэксп? Проста апошняе абнаўленне гема 2016 год ;(

jekhor commented 1 year ago

А што там абнаўляць? Крытычныя issue на гітхабе ёсць? Можа, ён проста дасягнуў дасканаласці?

Можна і на каленке зрабіць, але ж навошта?

сб, 14 сту 2023, 18:33 карыстальнік Yahor @.***> напісаў:

@jekhor https://github.com/jekhor без вельмі старога гема ipaddress не абйсціся? Можа быць праз рэгэксп? Проста апошняе абнаўленне гема 2016 год ;(

— Reply to this email directly, view it on GitHub https://github.com/minsk-hackerspace/hackerspace.by/pull/591#issuecomment-1382846430, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4VWYZPOZQGY6YKGIXDHLWSLIPJANCNFSM6AAAAAATKZCNNE . You are receiving this because you were mentioned.Message ID: @.***>

yahor commented 1 year ago

А што там абнаўляць? Крытычныя issue на гітхабе ёсць? Можа, ён проста дасягнуў дасканаласці? Можна і на каленке зрабіць, але ж навошта? сб, 14 сту 2023, 18:33 карыстальнік Yahor @.> напісаў: @jekhor https://github.com/jekhor без вельмі старога гема ipaddress не абйсціся? Можа быць праз рэгэксп? Проста апошняе абнаўленне гема 2016 год ;( — Reply to this email directly, view it on GitHub <#591 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4VWYZPOZQGY6YKGIXDHLWSLIPJANCNFSM6AAAAAATKZCNNE . You are receiving this because you were mentioned.Message ID: @.>

ну можна і так, галоўане пры абнаўленнях не было праблем з-за старога гема.

yahor commented 1 year ago

@jekhor а як пракаціць міграцыю? == 20221222221907 CreateWgConfigs: migrating ================================== -- create_table(:wg_configs) -> 0.0014s rails aborted! StandardError: An error has occurred, this and all later migrations canceled:

No such file or directory - wg /Users/yahorzhuchkou/Projects/hackerspace.by/app/models/wg_config.rb:67:in gen_privatekey' /Users/yahorzhuchkou/Projects/hackerspace.by/app/models/wg_config.rb:16:ingenerate_keys!' /Users/yahorzhuchkou/Projects/hackerspace.by/app/models/wg_config.rb:63:in init_keys' /Users/yahorzhuchkou/Projects/hackerspace.by/db/migrate/20221222221907_create_wg_configs.rb:38:inblock in up' /Users/yahorzhuchkou/Projects/hackerspace.by/db/migrate/20221222221907_create_wg_configs.rb:37:in `up'

Думаю варта міграцыю раздзяліць з генерацыяй дадзеных каб такое не ўзнікала.

rake task?

yahor commented 1 year ago

тэстам таксама не добра https://app.travis-ci.com/github/minsk-hackerspace/hackerspace.by/jobs/592117369

jekhor commented 1 year ago

Добрае пытанне. Прапановы? wg выкарыстоўваецца для генеравання ключоў.

нд, 12 сак 2023, 14:31 карыстальнік Yahor @.***> напісаў:

тэстам таксама не добра https://app.travis-ci.com/github/minsk-hackerspace/hackerspace.by/jobs/592117369

— Reply to this email directly, view it on GitHub https://github.com/minsk-hackerspace/hackerspace.by/pull/591#issuecomment-1465184543, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4VW7TFXV3XL6N3YILTKDW3W625ANCNFSM6AAAAAATKZCNNE . You are receiving this because you were mentioned.Message ID: @.***>

jekhor commented 1 year ago

Добра, можна rake паспрабаваць