403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/config/__pycache__/cc_wireguard.cpython-314.pyc
+
��i���$a�Rt 0tRt^RIt^RIt^RIHtHt^RIHt^RI	H
t
^RIHt^RI
HtRRR	R
.R]RR
./t]^k]P !]4t]!.R O4tRtRtR!tRRltRRltRRltRRltRRltRRltRtRRltR#)"�	WireguardN)�subp�util��Cloud)�Config)�
MetaSchema)�PER_INSTANCE�id�cc_wireguard�distros�ubuntu�	frequency�activate_by_schema_keys�	wireguardi��
c�$�V^8�dQhR\/#���wg_int��dict)�formats"�?/usr/lib/python3/dist-packages/cloudinit/config/cc_wireguard.py�__annotate__rs��
�
�4�
�c��.p\P\VP444pV'd/RP	\V44pVP
RV24\VP44FKwrEVR8XgVR8Xg
VR8XgK\V\4'dK4VP
RVRV24KM	V'd(\R\\P	V424hR	#)
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: �name�config_path�contentz$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&     r�supplemental_schema_validationr1s����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�
�	
�rc�$�V^8�dQhR\/#rr)rs"rrr;s�����rc
�H�\PRVR,4\PRVR,4\P!VR,VR,\R7R	# \
d.p\
RTR,R\\T424ThR	p?ii;i)
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_configr=;s����I�I�2�F�6�N�C�	��	�	�7��
�9N�O�����=�!�6�)�#4�;N�	
�����
��}�%�&�a��t�C��F�8�
5�
��	���s�AA)�)B!�4(B�B!c�0�V^8�dQhR\R\/#)rr�cloud)rr)rs"rrrPs����d��5�rc��\PRVR,4VPPRRVR,24\PRVR,4VPPRRVR,24R# \P
d$p\
R\\T424ThRp?ii;i)	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)	r6r7�distro�manage_servicer�ProcessExecutionErrorr;r,r*)rr?r<s&& r�	enable_wgrFPs�����	�	�0�&��.�A�
���#�#�H�	�&��.�9I�.J�K��	�	�5�v�f�~�F�
���#�#�I��6�&�>�:J�/K�L���%�%���>�r�d�3�q�6�(�K�
��	���s�BB
�
C�B=�=Cc�$�V^8�dQhR\/#�r�wg_readinessprobes��list)rs"rrrbs��
�
�$�
rc���.p^pVF;p\V\4'dKVPRVRV24V^,
pK=	V'd(\R\\PV424hR#)z�Basic validation of user-provided probes

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

@raises: ValueError of wrong datatype provided for probes.
z(Expected a string for readinessprobe at r z Invalid readinessProbe commands:N)r)r*r'r+r,r%)rIr-�pos�cs&   r�!readinessprobe_command_validationrObsz���F�
�C�
���!�S�!�!��M�M�:�3�%�x��s�K�
�
�1�H�C� ���.�r�d�2�7�7�6�?�2C�D�
�	
�rc�$�V^8�dQhR\/#rHrJ)rs"rrrxs��
�
�t�
rc�^�.pVF<p\PR\V44\P!VRRR7K>	V'd(\
R\\PV424hR# \Pd"pTPTRT24Rp?K�Rp?ii;i)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:)	r6r7r*rrEr'r;r,r%)rIr-rNr<s&   r�readinessproberUxs����F�
��	'��I�I�4�c�!�f�=��I�I�a��T�2� ���4�R�D������8I�J�
�	
����)�)�	'��M�M�Q�C�r�!��+�&�&��	'�s�8A6�6B,�B'�'B,c�$�V^8�dQhR\/#)rr?r)rs"rrr�s����E�rc��R.p\P!R4'dR#\P!4\8dVPR4VPP4TPPT4R# \d\P!\R4hi;i \d\P!\R4hi;i)z}Install wireguard packages and tools

@param cloud: Cloud object

@raises: Exception for issues during package
installation.
zwireguard-tools�wgNrzPackage update failedz!Failed to install wireguard-tools)r�whichr�kernel_version�MIN_KERNEL_VERSIONr'rC�update_package_sourcesr:�logexcr6�install_packages)r?�packagess& r� maybe_install_wireguard_packagesr`�s���"�"�H��z�z�$��������1�1�����$��
���+�+�-��
���%�%�h�/��	�����C�0�1�
���
�����C�<�=�
��s�B
�-B5�
(B2�5(Cc	��\P!RRRR7p\P!RVPP	44'g1\
P
R4\P!RRRR7R#R# \Pd4p\P!\
R\\T424hRp?ii;i)	zQLoad wireguard kernel module

@raises: ProcessExecutionError for issues modprobe
�lsmodTrRrzLoading wireguard kernel modulezmodprobe wireguardz Could not load wireguard module:N)r�re�search�stdout�stripr6r7rErr]r,r*)�outr<s  r�load_wireguard_kernel_modulerh�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�A
B�.B�C
�.C�C
c
�L�V^8�dQhR\R\R\R\RR/#)rr�cfgr?�args�returnN)r*rrrK)rs"rrr�s6��$A�$A��$A�6�$A�%�$A�t�$A��$Arc��RpRV9d \PR4VR,pM\PRV4R#\V4\4VR,F$p\	V4\V4\
WR4K&	RV9d-VR,e"VR,p\V4\V4R#\PR4R#)Nrz!Found Wireguard section in configz<Skipping module named %s, no 'wireguard' configuration found�
interfacesrUz+Skipping readinessprobe - no checks defined)	r6r7r`rhr1r=rFrOrU)rrjr?rk�
wg_sectionrrIs&&&&   r�handlerp�s����J��c���	�	�5�6���%�
��	�	�J��	
�	�%�U�+� �"��\�*�*��&�v�.�	�V��	�&� �+�	�J�&��'�(�4�'�(8�9��)�*<�=��)�*��	�	�?�@rc�@�V^8�dQh/^\9d
\;R&#)r�meta)�__conditional_annotations__r)rs"rrrs������j��r)rrr)��)!rs�__doc__�loggingrc�	cloudinitrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar�cloudinit.settingsr	rr�	getLogger�__name__r6�	frozensetr!r9r,r[r1r=rFrOrUr`rhrpr)rss@r�<module>r�s������	� �!�#�.�+�	�.�
��z�����}�	�������!�� �!C�D����	����
�:�*�$
�,
�*�<�$Ar

Youez - 2016 - github.com/yon3zu
LinuXploit