[{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/cas/","title":"CAS posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/security/","title":"Security Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/python/","title":"Python Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/azure/","title":"Azure (Microsoft Cloud Platform) Posts"},{"body":"Redirecting to current version of django-cas-ng document .\n document.location = '/docs/latest/'; ","excerpt":"Redirecting to current version of django-cas-ng document .\n document.location = '/docs/latest/'; ","ref":"https://djangocas.dev/docs/","title":"CAS Docs"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/nginx/","title":"nginx Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/oauth2/","title":"OAuth2 Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/posts/","title":"Blog Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/splunk/","title":"Splunk"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/db2/","title":"DB2 Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/docker/","title":"Docker Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/git/","title":"Git Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/go/","title":"Go Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/linux/","title":"Linux Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/npm/","title":"NPM posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/postgresql/","title":"PostgreSQL Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/rails/","title":"Rails Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/raspberrypi/","title":"Raspberry Pi Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/mac/","title":"Mac Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/android/","title":"Android Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/ios/","title":"iOS Posts"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/flutter/","title":"Flutter Posts"},{"body":" Free eBooks A collection of free eBooks...\nAlways keep up to date.\nYou Don't Know JS Yet (2nd Edition) Read online (html) Download in pdf format Download in epub format Download in mobi format Explore Flask (Last updated: 2020-02-26) ","excerpt":" Free eBooks A collection of free eBooks...\nAlways keep up to date.\nYou Don't Know JS Yet (2nd …","ref":"https://djangocas.dev/ebooks/","title":"Free eBooks"},{"body":" Web Performance Test / Benchmark Images load test Load various amount of images in a single HTML page.\n Test load 100 images in a page Test load 200 images in a page Test load 300 images in a page Test load 500 images in a page Test load 600 images in a page Test load 700 images in a page ","excerpt":" Web Performance Test / Benchmark Images load test Load various amount of images in a single HTML …","ref":"https://djangocas.dev/test/","title":"Test"},{"body":"","excerpt":"","ref":"https://djangocas.dev/blog/hugo/","title":"Hugo posts"},{"body":"Symptom When flashing a Pixel device using the flash-all.sh script, the process fails with the 'Could not open super partition' error:\n$ ./flash-all.sh Warning: skip copying bootloader_a image avb footer (bootloader_a partition size: 0, bootloader_a image size: 8726312). Sending \u0026#39;bootloader_a\u0026#39; (8521 KB) OKAY [ 0.320s] Writing \u0026#39;bootloader_a\u0026#39; (bootloader) Flashing Pack version b1c1-0.4-7617406 (bootloader) Flashing partition table for Lun = 0 (bootloader) Flashing partition table for Lun = 1 (bootloader) Flashing partition table for Lun = 2 (bootloader) Flashing partition table for Lun = 4 (bootloader) Flashing partition table for Lun = 5 (bootloader) Flashing partition msadp_a (bootloader) Flashing partition xbl_a (bootloader) Flashing partition xbl_config_a (bootloader) Flashing partition aop_a (bootloader) Flashing partition tz_a (bootloader) Flashing partition hyp_a (bootloader) Flashing partition abl_a (bootloader) Flashing partition keymaster_a (bootloader) Flashing partition cmnlib_a (bootloader) Flashing partition cmnlib64_a (bootloader) Flashing partition devcfg_a (bootloader) Flashing partition qupfw_a (bootloader) Flashing partition storsec_a (bootloader) Flashing partition logfs OKAY [ 0.719s] Finished. Total time: 1.489s Rebooting into bootloader OKAY [ 0.079s] Finished. Total time: 0.079s Warning: skip copying radio_a image avb footer (radio_a partition size: 0, radio_a image size: 73183372). Sending \u0026#39;radio_a\u0026#39; (71468 KB) OKAY [ 3.080s] Writing \u0026#39;radio_a\u0026#39; (bootloader) Flashing Pack version SSD:... (bootloader) Flashing partition modem_a OKAY [ 0.507s] Finished. Total time: 4.036s Rebooting into bootloader OKAY [ 0.079s] ... ... ... extracting boot.img (64 MB) to disk... took 0.786s archive does not contain \u0026#39;boot.sig\u0026#39; extracting super_empty.img (0 MB) to RAM... Sending \u0026#39;boot_a\u0026#39; (65536 KB) OKAY [ 1.650s] Writing \u0026#39;boot_a\u0026#39; OKAY [ 0.401s] extracting super_empty.img (0 MB) to RAM... extracting dtbo.img (8 MB) to disk... took 0.035s archive does not contain \u0026#39;dtbo.sig\u0026#39; extracting super_empty.img (0 MB) to RAM... Sending \u0026#39;dtbo_a\u0026#39; (8192 KB) OKAY [ 0.290s] Writing \u0026#39;dtbo_a\u0026#39; OKAY [ 0.106s] extracting super_empty.img (0 MB) to RAM... extracting vbmeta.img (0 MB) to disk... took 0.001s archive does not contain \u0026#39;vbmeta.sig\u0026#39; extracting super_empty.img (0 MB) to RAM... Sending \u0026#39;vbmeta_a\u0026#39; (8 KB) OKAY [ 0.120s] Writing \u0026#39;vbmeta_a\u0026#39; OKAY [ 0.067s] extracting super_empty.img (0 MB) to disk... took 0.000s Rebooting into fastboot OKAY [ 0.060s] \u0026lt; waiting for any device \u0026gt; Sending \u0026#39;system_a\u0026#39; (4 KB) OKAY [ 0.001s] Updating super partition OKAY [ 0.007s] Deleting \u0026#39;system_b\u0026#39; FAILED (remote: \u0026#39;Could not open super partition\u0026#39;) fastboot: error: Command failed The error \u0026ldquo;Could not open super partition\u0026rdquo; during a fastboot flash operation typically indicates an issue with accessing or modifying the super partition on the device.\nReboot and redo flash-all.sh get the same error again.\nSolution Since the Pixel devices use a dynamic partitioning scheme, and it have a b partition. If one failed. We can try to active the b partition and flash again.\n Reboot into fastboot mode: $ adb reboot bootloader Check the current active slot: $ fastboot getvar current-slot If it returns a, then we need to switch to slot b.\nHint: use fastboot getvar all to see all the variables if needed.\nSet the active slot to b: $ fastboot set_active b Setting current slot to \u0026#39;b\u0026#39; OKAY [ 0.023s] Verify the active slot has been changed: $ fastboot getvar current-slot Now, try running the flash-all.sh script again: ./flash-all.sh or just flash images that failed before:\nfastboot --set-active=b -w -v --skip-reboot update image.zip This should allow the flashing process to proceed. Full success flash log: ```sh $ fastboot --set-active=b -w -v --skip-reboot update image-blueline-sp1a.210812.016.c2.zip -------------------------------------------- Bootloader Version...: xxx Baseband Version.....: xxx Serial Number........: xxx -------------------------------------------- extracting android-info.txt (0 MB) to RAM... Checking \u0026#39;product\u0026#39; OKAY [ 0.000s] Checking \u0026#39;version-bootloader\u0026#39; OKAY [ 0.000s] Checking \u0026#39;version-baseband\u0026#39; OKAY [ 0.000s] Setting current slot to \u0026#39;b\u0026#39; OKAY [ 0.037s] archive does not contain \u0026#39;fastboot-info.txt\u0026#39; extracting boot.img (64 MB) to disk... took 0.411s fastboot: verbose: target reported max-download-size of 268435456 bytes archive does not contain \u0026#39;init_boot.img\u0026#39; extracting dtbo.img (8 MB) to disk... took 0.067s archive does not contain \u0026#39;dt.img\u0026#39; archive does not contain \u0026#39;pvmfw.img\u0026#39; archive does not contain \u0026#39;recovery.img\u0026#39; extracting vbmeta.img (0 MB) to disk... took 0.000s archive does not contain \u0026#39;vbmeta_system.img\u0026#39; archive does not contain \u0026#39;vbmeta_vendor.img\u0026#39; archive does not contain \u0026#39;vendor_boot.img\u0026#39; archive does not contain \u0026#39;vendor_kernel_boot.img\u0026#39; extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... archive does not contain \u0026#39;boot_other.img\u0026#39; archive does not contain \u0026#39;odm.img\u0026#39; archive does not contain \u0026#39;odm_dlkm.img\u0026#39; extracting product.img (2148 MB) to disk... took 19.844s extracting system.img (845 MB) to disk... took 5.716s archive does not contain \u0026#39;system_dlkm.img\u0026#39; extracting system_ext.img (236 MB) to disk... took 1.136s extracting system_other.img (67 MB) to disk... took 0.257s extracting vendor.img (442 MB) to disk... took 2.295s archive does not contain \u0026#39;vendor_dlkm.img\u0026#39; archive does not contain \u0026#39;vendor_other.img\u0026#39; extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash boot_b boot.img extracting boot.img (64 MB) to disk... took 0.304s archive does not contain \u0026#39;boot.sig\u0026#39; extracting super_empty.img (0 MB) to RAM... Sending \u0026#39;boot_b\u0026#39; (65536 KB) OKAY [ 1.549s] Writing \u0026#39;boot_b\u0026#39; OKAY [ 0.379s] extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash dtbo_b dtbo.img extracting dtbo.img (8 MB) to disk... took 0.019s archive does not contain \u0026#39;dtbo.sig\u0026#39; extracting super_empty.img (0 MB) to RAM... Sending \u0026#39;dtbo_b\u0026#39; (8192 KB) OKAY [ 0.192s] Writing \u0026#39;dtbo_b\u0026#39; OKAY [ 0.052s] extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash vbmeta_b vbmeta.img extracting vbmeta.img (0 MB) to disk... took 0.008s archive does not contain \u0026#39;vbmeta.sig\u0026#39; extracting super_empty.img (0 MB) to RAM... Sending \u0026#39;vbmeta_b\u0026#39; (8 KB) OKAY [ 0.001s] Writing \u0026#39;vbmeta_b\u0026#39; OKAY [ 0.003s] extracting super_empty.img (0 MB) to disk... took 0.000s Sending \u0026#39;system_b\u0026#39; (4 KB) OKAY [ 0.000s] Updating super partition OKAY [ 0.006s] Deleting \u0026#39;system_a\u0026#39; OKAY [ 0.005s] Deleting \u0026#39;vendor_a\u0026#39; OKAY [ 0.005s] Resizing \u0026#39;product_b\u0026#39; OKAY [ 0.005s] Resizing \u0026#39;system_b\u0026#39; OKAY [ 0.005s] Resizing \u0026#39;system_ext_b\u0026#39; OKAY [ 0.005s] Resizing \u0026#39;system_b\u0026#39; OKAY [ 0.006s] Resizing \u0026#39;vendor_b\u0026#39; OKAY [ 0.005s] extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash product_b product.img extracting product.img (2148 MB) to disk... took 16.836s archive does not contain \u0026#39;product.sig\u0026#39; Resizing \u0026#39;product_b\u0026#39; OKAY [ 0.005s] Sending sparse \u0026#39;product_b\u0026#39; 1/9 (262140 KB) OKAY [ 7.237s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.615s] Sending sparse \u0026#39;product_b\u0026#39; 2/9 (262140 KB) OKAY [ 7.441s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.674s] Sending sparse \u0026#39;product_b\u0026#39; 3/9 (262140 KB) OKAY [ 7.399s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.651s] Sending sparse \u0026#39;product_b\u0026#39; 4/9 (262140 KB) OKAY [ 7.438s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.638s] Sending sparse \u0026#39;product_b\u0026#39; 5/9 (262140 KB) OKAY [ 7.446s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.607s] Sending sparse \u0026#39;product_b\u0026#39; 6/9 (262140 KB) OKAY [ 7.516s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.662s] Sending sparse \u0026#39;product_b\u0026#39; 7/9 (262140 KB) OKAY [ 7.509s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.643s] Sending sparse \u0026#39;product_b\u0026#39; 8/9 (262140 KB) OKAY [ 7.163s] Writing \u0026#39;product_b\u0026#39; OKAY [ 1.625s] Sending sparse \u0026#39;product_b\u0026#39; 9/9 (102612 KB) OKAY [ 2.961s] Writing \u0026#39;product_b\u0026#39; OKAY [ 0.675s] extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash system_b system.img extracting system.img (845 MB) to disk... took 5.703s archive does not contain \u0026#39;system.sig\u0026#39; Resizing \u0026#39;system_b\u0026#39; OKAY [ 0.005s] Sending sparse \u0026#39;system_b\u0026#39; 1/4 (262140 KB) OKAY [ 6.218s] Writing \u0026#39;system_b\u0026#39; OKAY [ 1.663s] Sending sparse \u0026#39;system_b\u0026#39; 2/4 (262140 KB) OKAY [ 6.335s] Writing \u0026#39;system_b\u0026#39; OKAY [ 1.637s] Sending sparse \u0026#39;system_b\u0026#39; 3/4 (262140 KB) OKAY [ 6.338s] Writing \u0026#39;system_b\u0026#39; OKAY [ 1.662s] Sending sparse \u0026#39;system_b\u0026#39; 4/4 (79672 KB) OKAY [ 1.945s] Writing \u0026#39;system_b\u0026#39; OKAY [ 0.538s] extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash system_ext_b system_ext.img extracting system_ext.img (236 MB) to disk... took 1.962s archive does not contain \u0026#39;system_ext.sig\u0026#39; Resizing \u0026#39;system_ext_b\u0026#39; OKAY [ 0.005s] Sending \u0026#39;system_ext_b\u0026#39; (242504 KB) OKAY [ 5.743s] Writing \u0026#39;system_ext_b\u0026#39; OKAY [ 1.523s] extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash system_a system_other.img extracting system_other.img (67 MB) to disk... took 0.549s archive does not contain \u0026#39;system_other.sig\u0026#39; extracting super_empty.img (0 MB) to RAM... Sending \u0026#39;system_a\u0026#39; (69440 KB) OKAY [ 1.633s] Writing \u0026#39;system_a\u0026#39; OKAY [ 0.420s] extracting super_empty.img (0 MB) to RAM... fastboot: verbose: Do flash vendor_b vendor.img extracting vendor.img (442 MB) to disk... took 4.884s archive does not contain \u0026#39;vendor.sig\u0026#39; Resizing \u0026#39;vendor_b\u0026#39; OKAY [ 0.005s] Sending sparse \u0026#39;vendor_b\u0026#39; 1/2 (262140 KB) OKAY [ 6.256s] Writing \u0026#39;vendor_b\u0026#39; OKAY [ 1.674s] Sending sparse \u0026#39;vendor_b\u0026#39; 2/2 (191236 KB) OKAY [ 4.651s] Writing \u0026#39;vendor_b\u0026#39; OKAY [ 1.185s] Setting current slot to \u0026#39;b\u0026#39; OKAY [ 0.023s] Erasing \u0026#39;userdata\u0026#39; OKAY [ 5.758s] Erase successful, but not automatically formatting. File system type raw not supported. wipe task partition not found: cache Erasing \u0026#39;metadata\u0026#39; OKAY [ 0.107s] Erase successful, but not automatically formatting. File system type raw not supported. Finished. Total time: 193.796s fastboot usage quick reference % fastboot help usage: fastboot [OPTION...] COMMAND... flashing: update ZIP Flash all partitions from an update.zip package. flashall Flash all partitions from $ANDROID_PRODUCT_OUT. On A/B devices, flashed slot is set as active. Secondary images may be flashed to inactive slot. flash PARTITION [FILENAME] Flash given partition, using the image from $ANDROID_PRODUCT_OUT if no filename is given. basics: devices [-l] List devices in bootloader (-l: with device paths). getvar NAME Display given bootloader variable. reboot [bootloader] Reboot device. locking/unlocking: flashing lock|unlock Lock/unlock partitions for flashing flashing lock_critical|unlock_critical Lock/unlock \u0026#39;critical\u0026#39; bootloader partitions. flashing get_unlock_ability Check whether unlocking is allowed (1) or not(0). advanced: erase PARTITION Erase a flash partition. format[:FS_TYPE[:SIZE]] PARTITION Format a flash partition. set_active SLOT Set the active slot. oem [COMMAND...] Execute OEM-specific command. gsi wipe|disable Wipe or disable a GSI installation (fastbootd only). wipe-super [SUPER_EMPTY] Wipe the super partition. This will reset it to contain an empty set of default dynamic partitions. create-logical-partition NAME SIZE Create a logical partition with the given name and size, in the super partition. delete-logical-partition NAME Delete a logical partition with the given name. resize-logical-partition NAME SIZE Change the size of the named logical partition. snapshot-update cancel On devices that support snapshot-based updates, cancel an in-progress update. This may make the device unbootable until it is reflashed. snapshot-update merge On devices that support snapshot-based updates, finish an in-progress update if it is in the \u0026#34;merging\u0026#34; phase. fetch PARTITION OUT_FILE Fetch a partition image from the device. boot image: boot KERNEL [RAMDISK [SECOND]] Download and boot kernel from RAM. flash:raw PARTITION KERNEL [RAMDISK [SECOND]] Create boot image and flash it. --dtb DTB Specify path to DTB for boot image header version 2. --cmdline CMDLINE Override kernel command line. --base ADDRESS Set kernel base address (default: 0x10000000). --kernel-offset Set kernel offset (default: 0x00008000). --ramdisk-offset Set ramdisk offset (default: 0x01000000). --tags-offset Set tags offset (default: 0x00000100). --dtb-offset Set dtb offset (default: 0x01100000). --page-size BYTES Set flash page size (default: 2048). --header-version VERSION Set boot image header version. --os-version MAJOR[.MINOR[.PATCH]] Set boot image OS version (default: 0.0.0). --os-patch-level YYYY-MM-DD Set boot image OS security patch level. Android Things: stage IN_FILE Sends given file to stage for the next command. get_staged OUT_FILE Writes data staged by the last command to a file. options: -w Wipe userdata. -s SERIAL Specify a USB device. -s tcp|udp:HOST[:PORT] Specify a network device. -S SIZE[K|M|G] Break into sparse files no larger than SIZE. --force Force a flash operation that may be unsafe. --slot SLOT Use SLOT; \u0026#39;all\u0026#39; for both slots, \u0026#39;other\u0026#39; for non-current slot (default: current active slot). --set-active[=SLOT] Sets the active slot before rebooting. --skip-secondary Don\u0026#39;t flash secondary slots in flashall/update. --skip-reboot Don\u0026#39;t reboot device after flashing. --disable-verity Sets disable-verity when flashing vbmeta. --disable-verification Sets disable-verification when flashing vbmeta. --disable-super-optimization Disables optimizations on flashing super partition. --disable-fastboot-info Will collects tasks from image list rather than $OUT/fastboot-info.txt. --fs-options=OPTION[,OPTION] Enable filesystem features. OPTION supports casefold, projid, compress --unbuffered Don\u0026#39;t buffer input or output. --verbose, -v Verbose output. --version Display version. --help, -h Show this message. ","excerpt":"Symptom When flashing a Pixel device using the flash-all.sh script, the process fails with the …","ref":"https://djangocas.dev/blog/android/fastboot-flash-could-not-open-super-partition/","title":"Fix Android fastboot flash 'Could not open super partition'"},{"body":"Can Swift Data Take Ownership of a Raw Buffer Allocated by C on the Heap Without Recreating the Buffer? Description In Swift, you might encounter situations where you need to work with raw buffers allocated in C, especially when interfacing with C libraries or performing low-level memory management. A common question is whether Swift\u0026rsquo;s Data type can take ownership of a raw buffer allocated by C on the heap without having to recreate or copy the buffer.\nSwift\u0026rsquo;s Data type can take ownership of a raw buffer allocated by C on the heap without recreating the buffer. You can use the Data(bytesNoCopy:length:deallocator:) initializer to achieve this. This initializer allows you to provide a pointer to the buffer and specify a deallocator to free the memory when the Data object is deallocated.\nUse Case Consider a scenario where you have a C function that allocates a buffer on the heap and returns a pointer to this buffer. You want to use this buffer in Swift without incurring the overhead of copying the data. By taking ownership of the buffer, you can manage its lifecycle directly in Swift, ensuring efficient memory usage and avoiding unnecessary data duplication.\nExample C Code #include \u0026lt;stdlib.h\u0026gt;#include \u0026lt;string.h\u0026gt; void* allocateBuffer(size_t size) { void* buffer = malloc(size); if (buffer) { memset(buffer, 0, size); // Initialize buffer to zero } // ... return buffer; } Swift Code: ```swift import Foundation // Assume this function is provided by a C library func allocateBuffer(size: Int) -\u0026gt; UnsafeMutableRawPointer? // Function to create Data from a raw buffer func dataFromCBuffer(size: Int) -\u0026gt; Data? { guard let rawBuffer = allocateBuffer(size: size) else { return nil } // Create Data from the raw buffer without copying let data = Data(bytesNoCopy: rawBuffer, count: size, deallocator: .free) return data } // Example usage if let data = dataFromCBuffer(size: 1024) { // Use the data print(\u0026#34;Data created with size: \\(data.count)\u0026#34;) } else { print(\u0026#34;Failed to allocate buffer\u0026#34;) } Explanation:\n C Function: The allocateBuffer function allocates a buffer on the heap and initializes it to zero. Swift Function: The dataFromCBuffer function calls the C function to allocate the buffer and then creates a Data instance using Data(bytesNoCopy:count:deallocator:). Ownership Transfer: By using the .free deallocator, Swift takes ownership of the buffer and ensures it is freed when the Data instance is deallocated. This approach allows you to efficiently manage memory by avoiding unnecessary copies and ensuring that the buffer is properly deallocated when the Data object is no longer needed.\n","excerpt":"Can Swift Data Take Ownership of a Raw Buffer Allocated by C on the Heap Without Recreating the …","ref":"https://djangocas.dev/blog/ios/swift-data-init-heap-buffer-free-in-swift-data-bytesNoCopy-deallocator/","title":"Swift Data init with heap buffer from C and free in Swift"},{"body":"DispatchQueue, Qos, DispatchGroup Best Practices \u0026amp; Common Pitfalls to Avoid, examples / Sample code.\nDispatchQueue QoS Order In Swift, DispatchQueue allows you to specify the Quality of Service (QoS) for the tasks you dispatch. The QoS classes determine the priority of the tasks and how they are scheduled by the system. Here is the order of QoS classes from highest to lowest priority:\n userInteractive userInitiated default utility background unspecified Explanation of DispatchQueue QoS Classes DispatchQueue depends on the nature and priority of the task you are performing. Here are the general recommendations for each QoS class:\n userInteractive: For tasks that need to be done immediately to provide a smooth user experience, such as animations or event handling. These tasks should complete in a few milliseconds. userInitiated: For tasks that the user has initiated and is waiting for immediate results, such as opening a document or performing a calculation. These tasks should complete in a few seconds. default: The default QoS class for tasks that do not have a specific priority. Use this for tasks that do not fall into any other category. utility: For tasks that do not require immediate results and can run in the background, such as downloading files or processing data. These tasks can take a few seconds to minutes. background: For tasks that are not visible to the user and can run in the background, such as syncing data or performing maintenance tasks. These tasks can take minutes to hours. unspecified: For tasks that do not have a specified QoS class. Use this for tasks that do not have a specified QoS class. This is rarely used and generally not recommended unless you have a specific reason. Example Usage of DispatchQueue QoS Classes Here\u0026rsquo;s an example of how to create DispatchQueue instances with different QoS classes:\nimport Foundation let userInteractiveQueue = DispatchQueue.global(qos: .userInteractive) let userInitiatedQueue = DispatchQueue.global(qos: .userInitiated) let defaultQueue = DispatchQueue.global(qos: .default) let utilityQueue = DispatchQueue.global(qos: .utility) let backgroundQueue = DispatchQueue.global(qos: .background) // Example of dispatching tasks with different QoS userInteractiveQueue.async { print(\u0026#34;User Interactive Task\u0026#34;) } userInitiatedQueue.async { print(\u0026#34;User Initiated Task\u0026#34;) } defaultQueue.async { print(\u0026#34;Default Task\u0026#34;) } utilityQueue.async { print(\u0026#34;Utility Task\u0026#34;) } backgroundQueue.async { print(\u0026#34;Background Task\u0026#34;) } In this example, tasks are dispatched to different global queues with specified QoS classes. The system will prioritize the execution of these tasks based on their QoS. Choose the appropriate QoS class based on the urgency and importance of the task to ensure optimal performance and user experience.\nDispatch queue starvation Dispatch queue starvation occurs when higher-priority tasks continuously occupy the CPU, preventing lower-priority tasks from executing. This can lead to a situation where lower-priority tasks are \u0026ldquo;starved\u0026rdquo; of CPU time.\nTo avoid dispatch queue starvation, you can:\n Balance Task Priorities: Ensure that not all tasks are assigned the highest priority. Use appropriate QoS classes based on the task\u0026rsquo;s urgency and importance. Limit Concurrent Tasks: Control the number of concurrent tasks to prevent overwhelming the system. Use Serial Queues: For tasks that can be executed sequentially, use serial queues to avoid contention. Here\u0026rsquo;s an example demonstrating how to balance task priorities and use serial queues to avoid starvation: Here\u0026rsquo;s an example demonstrating how to balance task priorities and use serial queues to avoid starvation:\nimport Foundation let highPriorityQueue = DispatchQueue.global(qos: .userInitiated) let lowPriorityQueue = DispatchQueue.global(qos: .utility) let serialQueue = DispatchQueue(label: \u0026#34;com.example.serialQueue\u0026#34;) // High priority task highPriorityQueue.async { for i in 1...5 { print(\u0026#34;High Priority Task \\(i)\u0026#34;) sleep(1) // Simulate work } } // Low priority task lowPriorityQueue.async { for i in 1...5 { print(\u0026#34;Low Priority Task \\(i)\u0026#34;) sleep(1) // Simulate work } } // Serial queue task serialQueue.async { for i in 1...5 { print(\u0026#34;Serial Queue Task \\(i)\u0026#34;) sleep(1) // Simulate work } } In this example:\n highPriorityQueue is used for high-priority tasks. lowPriorityQueue is used for low-priority tasks. serialQueue ensures tasks are executed sequentially, preventing contention. By balancing task priorities and using serial queues where appropriate, you can help prevent dispatch queue starvation and ensure a smoother execution of tasks.\nBest Practices for DispatchQueue 1. Use Appropriate QoS Classes Assign the correct Quality of Service (QoS) class based on the task\u0026rsquo;s priority and urgency:\n userInteractive: For tasks that need to be done immediately to provide a smooth user experience. userInitiated: For tasks initiated by the user that require immediate results. utility: For long-running tasks that do not need immediate results. background: For tasks that can run in the background without affecting the user experience. 2. Avoid Blocking the Main Thread The main thread should remain responsive to user interactions. Avoid performing long-running or blocking operations on the main thread.\n3. Use Serial Queues for Sequential Tasks Use serial queues to ensure tasks are executed sequentially, which can help prevent race conditions and data corruption.\n4. Limit the Number of Concurrent Tasks Avoid overwhelming the system by limiting the number of concurrent tasks. Use a serial queue or a semaphore to control the concurrency level.\n5. Use async for Non-blocking Operations Use async to dispatch tasks that do not need to block the current thread.\n6. Clean Up Resources Ensure that resources are properly cleaned up after tasks are completed to avoid memory leaks.\n7. Use DispatchGroup for Synchronization Use DispatchGroup to synchronize multiple tasks and wait for their completion.\nExample Code Here\u0026rsquo;s an example demonstrating some of these best practices:\nimport Foundation let highPriorityQueue = DispatchQueue.global(qos: .userInitiated) let lowPriorityQueue = DispatchQueue.global(qos: .utility) let serialQueue = DispatchQueue(label: \u0026#34;com.example.serialQueue\u0026#34;) let dispatchGroup = DispatchGroup() // High priority task highPriorityQueue.async(group: dispatchGroup) { for i in 1...5 { print(\u0026#34;High Priority Task \\(i)\u0026#34;) sleep(1) // Simulate work } } // Low priority task lowPriorityQueue.async(group: dispatchGroup) { for i in 1...5 { print(\u0026#34;Low Priority Task \\(i)\u0026#34;) sleep(1) // Simulate work } } // Serial queue task serialQueue.async(group: dispatchGroup) { for i in 1...5 { print(\u0026#34;Serial Queue Task \\(i)\u0026#34;) sleep(1) // Simulate work } } // Notify when all tasks are complete dispatchGroup.notify(queue: DispatchQueue.main) { print(\u0026#34;All tasks are complete\u0026#34;) } Common Pitfalls to Avoid When Using DispatchQueue in Swift 1. Blocking the Main Thread Avoid performing long-running or blocking operations on the main thread, as it can make your app unresponsive. Always dispatch such tasks to a background queue.\n2. Overusing Global Queues While global concurrent queues are convenient, overusing them can lead to resource contention and performance issues. Use custom serial or concurrent queues when appropriate.\n3. Not Using QoS Appropriately Failing to assign the correct Quality of Service (QoS) class can lead to suboptimal performance. Ensure tasks are assigned the appropriate QoS based on their priority and urgency.\n4. Ignoring Thread Safety Accessing shared resources from multiple threads without proper synchronization can lead to race conditions and data corruption. Use synchronization mechanisms like serial queues or locks.\n5. Creating Too Many Queues Creating an excessive number of queues can lead to resource exhaustion and performance degradation. Reuse existing queues when possible.\n6. Forgetting to Clean Up Resources Ensure that resources are properly cleaned up after tasks are completed to avoid memory leaks and other resource management issues.\n7. Not Using DispatchGroup for Synchronization When multiple tasks need to be synchronized, failing to use DispatchGroup can lead to complex and error-prone code. Use DispatchGroup to manage task synchronization effectively.\nUsing DispatchGroup in Swift DispatchGroup allows you to group multiple tasks together and be notified when they have all completed. This is useful for synchronizing tasks and ensuring that certain code runs only after a set of tasks has finished.\nExample Code Here\u0026rsquo;s an example demonstrating how to use DispatchGroup:\nimport Foundation let dispatchGroup = DispatchGroup() let highPriorityQueue = DispatchQueue.global(qos: .userInitiated) let lowPriorityQueue = DispatchQueue.global(qos: .utility) // High priority task dispatchGroup.enter() highPriorityQueue.async { for i in 1...5 { print(\u0026#34;High Priority Task \\(i)\u0026#34;) sleep(1) // Simulate work } dispatchGroup.leave() } // Low priority task dispatchGroup.enter() lowPriorityQueue.async { for i in 1...5 { print(\u0026#34;Low Priority Task \\(i)\u0026#34;) sleep(1) // Simulate work } dispatchGroup.leave() } // Notify when all tasks are complete dispatchGroup.notify(queue: DispatchQueue.main) { print(\u0026#34;All tasks are complete\u0026#34;) } // Keep the main thread alive to see the output RunLoop.main.run(until: Date(timeIntervalSinceNow: 10)) Happy concurrency coding.\nReferences Apple Developer Documentation - DispatchQueue Apple Developer Documentation - Quality of Service (QoS) Concurrency Programming Guide - Apple Developer ","excerpt":"DispatchQueue, Qos, DispatchGroup Best Practices \u0026amp; Common Pitfalls to Avoid, examples / Sample …","ref":"https://djangocas.dev/blog/ios/dispatchqueue-qos-order-explained-best-practices/","title":"DispatchQueue QoS Order Explained Best Practices \u0026 Common Pitfalls to Avoid"},{"body":"abcde - Rip an entire CD and compress it into various audio formats including Ogg/Vorbis, MP3, FLAC, Ogg/Speex, AAC, WavPack, Monkey\u0026rsquo;s Audio (ape), Musepack, True Audio (tta), MP2, and AIFF.\nWhy abcde The usual process of extracting data from a CD, encoding it, and then tagging or commenting on it is quite complex. abcde automates this process. It converts an entire CD into compressed audio formats such as Ogg/Vorbis, MP3, FLAC, Ogg/Speex, Musepack, AAC, WavPack, Monkey\u0026rsquo;s Audio (ape), Opus, True Audio (tta), MP2, or AIFF. With a single command, it can:\n Perform a CDDB or MusicBrainz query online to identify your CD, use a locally stored CDDB entry, or read CD-TEXT if available. Download appropriate album art for your tracks with numerous configurable options for download and post-download modifications, including automated embedding for some containers. Extract an audio track (or all tracks) from your CD. Normalize the volume of each file (or the album as a whole). Compress tracks into formats such as Ogg/Vorbis, MP3, FLAC, Ogg/Speex, Musepack, AAC, WavPack, Monkey\u0026rsquo;s Audio (ape), Opus, True Audio (tta), MP2, or AIFF, all in one read. Add comments or ID3/ID3v2 tags. Generate intelligible filenames. Calculate replaygain values for each file (or the album as a whole). Delete the intermediate WAV file (or save it for future use). Repeat the process until complete. Alternatively, abcde can rip a CD and convert it into a single FLAC file with an embedded cuesheet, which can later be used as a source for other formats, essentially acting as a compressed backup of your CD collection.\nInstall abcde Install abcde on Linux:\n% apt search abcde abcde/noble 2.9.3-1 all A Better CD Encoder sudo apt install abcde Install abcde on Mac:\n$ brew info abcde ==\u0026gt; abcde: stable 2.9.3 (bottled), HEAD Better CD Encoder https://abcde.einval.com Not installed From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/a/abcde.rb $ brew install abcde Config abcde Put following config to $HOME/.abcde.conf to for generate FLAC output. You may customize it per your requirement.\n# -----------------$HOME/.abcde.conf----------------- # # # A sample configuration file to convert music cds to # FLAC using abcde version 2.9.3 # # https://andrews-corner.org/abcde/ # -------------------------------------------------- # # Encode tracks immediately after reading. Saves disk space, gives # better reading of \u0026#39;scratchy\u0026#39; disks and better troubleshooting of # encoding process but slows the operation of abcde quite a bit: LOWDISK=y # Specify the method to use to retrieve the track information, # the alternative is to specify \u0026#39;musicbrainz\u0026#39;: CDDBMETHOD=cddb # With the demise of freedb (thanks for the years of service!) # we move to an alternative: CDDBURL=\u0026#34;http://gnudb.gnudb.org/~cddb/cddb.cgi\u0026#34; # Make a local cache of cddb entries and then volunteer to use # these entries when and if they match the cd: CDDBCOPYLOCAL=\u0026#34;y\u0026#34; CDDBLOCALDIR=\u0026#34;$HOME/.cddb\u0026#34; CDDBLOCALRECURSIVE=\u0026#34;y\u0026#34; CDDBUSELOCAL=\u0026#34;y\u0026#34; # Specify the encoder to use for FLAC. In this case # flac is the only choice. FLACENCODERSYNTAX=flac # Specify the path to the selected encoder. In most cases the encoder # should be in your $PATH as I illustrate below, otherwise you will # need to specify the full path. For example: /usr/bin/flac FLAC=flac # Specify your required encoding options here. Multiple options can # be selected as \u0026#39;--best --another-option\u0026#39; etc. # Overall bitrate is about 880 kbs/s with level 8. FLACOPTS=\u0026#39;-s -e -V -8\u0026#39; # Output type for FLAC. OUTPUTTYPE=\u0026#34;flac\u0026#34; # The cd ripping program to use. There are a few choices here: cdda2wav, # dagrab, cddafs (Mac OS X only) and flac. New to abcde 2.7 is \u0026#39;libcdio\u0026#39;. # CDROMREADERSYNTAX=cdparanoia # Give the location of the ripping program and pass any extra options, # if using libcdio set \u0026#39;CD_PARANOIA=cd-paranoia\u0026#39;. # CDPARANOIA=cdparanoia # CDPARANOIAOPTS=\u0026#34;--never-skip=40\u0026#34; # Give the location of the CD identification program: CDDISCID=cd-discid # Give the base location here for the encoded music files. # OUTPUTDIR=\u0026#34;$HOME/Music\u0026#34; # The default actions that abcde will take. ACTIONS=cddb,playlist,read,encode,tag,move,clean # Decide here how you want the tracks labelled for a standard \u0026#39;single-artist\u0026#39;, # multi-track encode and also for a multi-track, \u0026#39;various-artist\u0026#39; encode: OUTPUTFORMAT=\u0026#39;${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM} ${ARTISTFILE} ${TRACKFILE}\u0026#39; VAOUTPUTFORMAT=\u0026#39;${OUTPUT}/Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}\u0026#39; # Decide here how you want the tracks labelled for a standard \u0026#39;single-artist\u0026#39;, # single-track encode and also for a single-track \u0026#39;various-artist\u0026#39; encode. # (Create a single-track encode with \u0026#39;abcde -1\u0026#39; from the commandline.) ONETRACKOUTPUTFORMAT=\u0026#39;${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}\u0026#39; VAONETRACKOUTPUTFORMAT=\u0026#39;${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}\u0026#39; # Create playlists for single and various-artist encodes. I would suggest # commenting these out for single-track encoding. PLAYLISTFORMAT=\u0026#39;${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}.m3u\u0026#39; VAPLAYLISTFORMAT=\u0026#39;${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}.m3u\u0026#39; # This function takes out dots preceding the album name, and removes a grab # bag of illegal characters. It allows spaces, if you do not wish spaces add # in -e \u0026#39;s/ /_/g\u0026#39; after the first sed command. mungefilename () { echo \u0026#34;$@\u0026#34; | sed -e \u0026#39;s/^\\.*//\u0026#39; | tr -d \u0026#34;:\u0026gt;\u0026lt;|*/\\\u0026#34;\u0026#39;?[:cntrl:]\u0026#34; } # What extra options? MAXPROCS=2 # Run a few encoders simultaneously PADTRACKS=y # Makes tracks 01 02 not 1 2 EXTRAVERBOSE=2 # Useful for debugging # COMMENT=\u0026#39;abcde version 2.9.3\u0026#39; # Place a comment, this will write as value of DESCRIPTION tag. EJECTCD=y # Please eject cd when finished :-) Use abcde to generate flac with config file With config file $HOME/.abcde.conf, Simple type abcde will work, you can also use -o flac to specific output format.\nsudo abcde -o flac Password: Executing customizable pre-read function... done. Getting CD track info... Volume Mozart: Arias on disk8 unmounted Volume Mozart: Arias on disk8 mounted Grabbing entire CD - tracks: 01 02 03 04 05 06 07 Found 0 matches so far Trying lookup method cddb Checking CDDB server status... Querying the CDDB server... Obtaining CDDB results... Retrieved 1 match... #1 (cddb): ---- Wolfgang Amadeus Mozart / ... ---- 1: Die.. zum Lose 2: Mitridate,.. 3: Don Giovanni,... 4: Ch\u0026#39;io mi scordi... 5: Don Giovanni,... 6: Misera,... 7: Die... Which entry would you like abcde to use (0 for none)? [0-1]: 1 Selected: #1 ... Year: 1987 Genre: Classical ... Edit selected CDDB data [y/N]? n Is the CD multi-artist [y/N]? Creating playlist... Grabbing track 01: ... Encoding track 01 of 07: ... encodetrack-flac-01 nice -n 10 flac -f -s -e -V -8 -o Music/CD/abcde.6c0d3d07/track01.flac Music/CD/abcde.6c0d3d07/track01.wav track01.wav: WARNING: skipping unknown chunk \u0026#39;FVER\u0026#39; (use --keep-foreign-metadata to keep) encodetrack-01 true Tagging track 01 of 07: ... tagtrack-flac-01 nice -n 10 metaflac --no-utf8-convert --import-tags-from=- Music/CD/abcde.6c0d3d07/track01.flac tagtrack-01 true movetrack-01 mv Music/CD/abcde.6c0d3d07/track01.flac ... movetrack-output-flac true ... ... ... Volume failed to eject Finished. Troubleshooting abcde: cd-discid is not in your path. Symptom:\n$ abcde -o flac [ERROR] abcde: cd-discid is not in your path. [INFO] Define the full path to the executable if it exists on your system. Solution:\nTo fix abcde: cd-discid is not in your path., install cd-discid:\n$ brew info cd-discid ==\u0026gt; cd-discid: stable 1.4 (bottled), HEAD Read CD and get CDDB discid information https://linukz.org/cd-discid.shtml Not installed brew install cd-discid cd-discid: /dev/disk9: open: Permission denied Symptom:\n$ abcde -o flac Volume Audio CD on disk9 unmounted cd-discid: /dev/disk9: open: Permission denied Error: cannot open device `/dev/disk9\u0026#39; [ERROR] abcde: abcde-musicbrainz-tool failed to run; ABORT Sulution:\nRun with sudo:\n$ sudo abcde -o flac Password: Executing customizable pre-read function... done. Getting CD track info... Volume Audio CD on disk9 unmounted Volume Audio CD on disk9 mounted Grabbing entire CD - tracks: 01 02 03 04 05 06 07 08 09 10 Found 0 matches so far Trying lookup method cddb Checking CDDB server status... Querying the CDDB server... Obtaining CDDB results... Retrieving multiple matches... done. Retrieved 3 matches... ... Sample abcde Usages Basic CD Rip abcde This command will start the ripping process using the default settings in your .abcde.conf file.\nRip and Encode to MP3 abcde -o mp3 This command will rip the CD and encode the tracks to MP3 format.\nRip and Encode to FLAC abcde -o flac This command will rip the CD and encode the tracks to FLAC format.\nRip and Encode to Ogg Vorbis abcde -o vorbis This command will rip the CD and encode the tracks to Ogg Vorbis format.\nSpecify Output Directory abcde -d /dev/cdrom -o mp3 -x -N -P -o /path/to/output This command will rip the CD from the specified CD device /dev/cdrom, encode to MP3, and save the output to /path/to/output.\nRip CD and Save Logs abcde -l This command will rip the CD and save the logs of the process.\nUse a Custom Configuration File abcde -c /path/to/custom_abcde.conf This command will use a specified custom configuration file for ripping the CD.\nRip CD with High-Quality MP3 Settings abcde -o mp3 -a cddb,read,encode,tag,move,clean -x -B -p This command will rip the CD, encode to high-quality MP3, and perform additional actions like cleaning up temporary files after the process.\nabcede Commandline Options Reference $ abcde -h This is abcde v2.9.3. Usage: abcde [options] [tracks] Options: -1 Encode the whole CD in a single file -a \u0026lt;action1[,action2]...\u0026gt; Actions to perform, comma separated: (cddb,read,getalbumart,embedalbumart,normalize,encode, tag,move,replaygain,playlist,clean) -b Enable batch normalization -B Embed albumart (this also activates getalbumart) -c \u0026lt;file\u0026gt; Specify a configuration file (overrides system and user config files) -C \u0026lt;discid#\u0026gt; Specify discid to resume from (only needed if you no longer have the cd) -d \u0026lt;device\u0026gt; Specify CDROM device to grab (flac uses a single-track flac file) -D Debugging mode (equivalent to sh -x abcde) -e Erase encoded track information from status file -f Force operations that otherwise are considered harmful. Read \u0026#34;man abcde\u0026#34; -g Use \u0026#34;lame --nogap\u0026#34; for MP3 encoding. Disables low disk and pipes flags -G Get album art by using the \u0026#39;getalbumart\u0026#39; action -h This help information -j \u0026lt;#\u0026gt; Number of encoder processes to run at once (localhost) -k Keep the wav tracks for later use -l Use low disk space algorithm -L Use local CDDB storage directory -m Modify playlist to include CRLF endings, to comply with some players -n No lookup. Don\u0026#39;t query CDDB, just create and use template -N Noninteractive. Never prompt for anything -o \u0026lt;type1[,type2]...\u0026gt; Output file type(s), comma separated (vorbis,mp3,flac,spx,mpc,wav,m4a,opus,mka,wv,ape,mp2,tta,aiff). Defaults to vorbis -p Pad track numbers with 0\u0026#39;s (if less than 10 tracks) -P Use UNIX pipes to read+encode without wav files -Q CD lookup method(s), comma separated (musicbrainz,cddb,cdtext). Defaults to musicbrainz. -r \u0026lt;host1[,host2]...\u0026gt; Also encode on these remote hosts -s \u0026lt;field\u0026gt; Show fields from the CDDB info (year,genre) -S \u0026lt;#\u0026gt; Set the CD speed -t \u0026lt;#\u0026gt; Start the track numbering at a given number -T \u0026lt;#\u0026gt; Same as -t but modifies tag numbering -U Do NOT use UNICODE (UTF8) tags and comments -v Show version number and exit -V Be a bit more verbose about what is happening behind the scenes -x Eject CD after all tracks are read -w \u0026lt;comment\u0026gt; Add a comment to the CD tracks -W \u0026lt;#\u0026gt; Concatenate CDs: -T #01 -w \u0026#34;CD #\u0026#34; -z Use debug CDROMREADERSYNTAX option (needs cdparanoia) Tracks is a space-delimited list of tracks to grab. Ranges specified with hyphens are allowed (i.e., 1-5). Reference abcde - A Better CD Encoder ","excerpt":"abcde - Rip an entire CD and compress it into various audio formats including Ogg/Vorbis, MP3, FLAC, …","ref":"https://djangocas.dev/blog/rip-audio-cd-with-abcde-on-mac-and-linux/","title":"High quality rip audio CD to FLAC with abcde on Mac and Linux"},{"body":"Get the IP address of a network interface by its name in Python, on Linux To get the IP address of a network interface by its name in Python, you can use the socket and fcntl modules. Here\u0026rsquo;s a step-by-step approach:\n Import the necessary modules. Create a socket. Use the fcntl.ioctl function to get the IP address of the specified network interface. Here\u0026rsquo;s the code to achieve this:\n# get_ip_linux.py import socket import fcntl import struct from typing import Optional def get_ip_address(ifname: str) -\u0026gt; Optional[str]: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: ip_address = fcntl.ioctl( s.fileno(), 0x8915, # SIOCGIFADDR struct.pack(\u0026#39;256s\u0026#39;, ifname[:15].encode(\u0026#39;utf-8\u0026#39;)) )[20:24] return socket.inet_ntoa(ip_address) except IOError: return None # Example usage interface_name = \u0026#39;eth0\u0026#39; # Replace with your network interface name ip_address = get_ip_address(interface_name) if ip_address: print(f\u0026#39;The IP address of {interface_name}is {ip_address}\u0026#39;) else: print(f\u0026#39;Could not get the IP address of {interface_name}\u0026#39;) Sample output:\nThe IP address of eth0 is 192.168.1.110 In this example:\n The get_ip_address function takes the network interface name (ifname) as an argument. A socket is created using socket.socket. The fcntl.ioctl function is used to get the IP address of the specified network interface. The 0x8915 constant is the request code for SIOCGIFADDR, which retrieves the address of the network interface. The IP address is extracted from the result and converted to a human-readable format using socket.inet_ntoa. The function returns the IP address or None if an error occurs. Replace \u0026lsquo;eth0\u0026rsquo; with the name of your network interface to get its IP address.\nGet the IP address of a network interface by its name in Python, on Mac OS X import psutil import socket def get_ip_address(ifname: str) -\u0026gt; str: addrs = psutil.net_if_addrs() if ifname in addrs: for addr in addrs[ifname]: if addr.family == socket.AF_INET: return addr.address return None # Example usage ifname = \u0026#39;en0\u0026#39; # Replace with your network interface name ip_address = get_ip_address(ifname) if ip_address: print(f\u0026#39;The IP address of {ifname}is {ip_address}\u0026#39;) else: print(f\u0026#39;Could not get the IP address of {ifname}\u0026#39;) Sample output:\nThe IP address of en0 is 192.168.1.119 Explanation:\n Import psutil: Import the psutil library. Get Network Interface Addresses: Use psutil.net_if_addrs() to get a dictionary of network interfaces and their addresses. Check Interface: Check if the specified interface name exists in the dictionary. Retrieve IP Address: Iterate through the addresses of the interface and return the IPv4 address. Handle Missing Interface: Return None if the interface or IPv4 address is not found. Related pages: How to Parse URLs in Python: A Comprehensive Guide with Examples Python: How to print literal curly brace { or } in f-string and format string Python unicode string lowercase and caseless match References psutil documentation ","excerpt":"Get the IP address of a network interface by its name in Python, on Linux To get the IP address of a …","ref":"https://djangocas.dev/blog/python/get-ip-address-from-network-interface-name-linux-mac-osx/","title":"Get the IP address of a network interface by its name in Python on Linux an Mac OS X"},{"body":"What is smartctl smartctl is a powerful tool for monitoring the health and performance of your storage devices, helping to prevent data loss by providing early warnings of potential drive failures.\nsmartctl is a command-line utility that is part of the SMART Monitoring Tools (smartmontools) package. It is used to control and monitor storage devices using the Self-Monitoring, Analysis, and Reporting Technology (SMART) system built into most modern hard drives (HDDs) and solid-state drives (SSDs). smartctl can provide detailed information about the health and performance of these drives, which can help in diagnosing potential issues and predicting drive failures.\nKey Features of smartctl SMART Status: Check the overall health status of the drive. Attributes: Retrieve detailed SMART attributes, such as read error rates, power-on hours, temperature, and more. Self-tests: Run built-in self-tests on the drive to check for errors. Error Logs: Access and display the error logs maintained by the drive. Device Information: Display detailed information about the drive, including model number, serial number, firmware version, and more. Common smartctl Commands To get a quick overview of a drive\u0026rsquo;s health status and attributes, you can run:\nsmartctl -a /dev/sdX This command will display all available information about the drive, including health status, attributes, self-test results, and error logs.\nCheck Health Status:\nsmartctl -H /dev/sdX Checks the overall health status of the drive (replace /dev/sdX with the appropriate device identifier).\nDisplay SMART Attributes:\nsmartctl -A /dev/sdX Displays detailed SMART attributes of the drive.\nRun a Short Self-Test:\nsmartctl -t short /dev/sdX Initiates a short self-test on the drive.\nRun an Extended Self-Test:\nsmartctl -t long /dev/sdX Initiates a longer and more thorough self-test on the drive.\nDisplay Device Information:\nsmartctl -i /dev/sdX Displays detailed information about the drive.\nDisplay Error Logs:\nsmartctl -l error /dev/sdX Displays the error logs from the drive.\nInstall smartctl Ubuntu/Debian:\nsudo apt-get install smartmontools CentOS/RHEL:\nsudo yum install smartmontools Arch Linux:\nsudo pacman -S smartmontools MacOS:\nbrew install smartmontools smartctl test type explained smartctl can perform various types of tests on storage devices to assess their health and performance. Here are the primary test types it offers:\n1. Short Self-Test (-t short) Purpose: Quickly checks the most common problems with the drive. Duration: Typically takes a few minutes (usually 1-2 minutes). Scope: Tests electrical properties, the read/write head, and a small portion of the surface. Use Case: Useful for quick diagnostics and regular checks. 2. Long Self-Test (-t long) Purpose: Thoroughly checks the entire surface of the drive and all internal functions. Duration: Can take several hours depending on the size and speed of the drive. Scope: Comprehensive test that includes all aspects of the short test but covers the entire surface. Use Case: Ideal for in-depth diagnostics, periodic health checks, or when problems are suspected. 3. Conveyance Self-Test (-t conveyance) Purpose: Designed to detect damage incurred during transport of the device. Duration: Typically takes a few minutes (around 5 minutes). Scope: Focuses on areas likely to be affected by physical transport. Use Case: Useful for newly shipped drives to ensure they have not been damaged during shipping. 4. Selective Self-Test Purpose: Allows testing of specific ranges of the drive\u0026rsquo;s surface. Duration: Variable, depends on the size of the selected range and drive speed. Scope: User-defined segments of the drive. Use Case: Targeted diagnostics, particularly if specific sections are suspected to have issues. 5. Offline Data Collection Purpose: Performs background tests and updates SMART attributes without impacting normal drive operation. Duration: Runs continuously in the background, may pause during heavy I/O operations. Scope: Varies based on the drive\u0026rsquo;s capabilities and the tests it performs. Use Case: Continuous monitoring and data collection for proactive health assessment. Command Usage Example To perform a short self-test on a drive, you would use the following command:\nsmartctl -t short /dev/sdX Here, /dev/sdX represents the device identifier for the drive you wish to test (e.g., /dev/sda).\nBy running these tests periodically, you can monitor the health of your storage devices and preemptively address potential failures.\nSample smartctl output and explanation $ smartcl -a /dev/sdb ... Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0 2 Throughput_Performance 0x0004 129 129 054 Old_age Offline - 112 3 Spin_Up_Time 0x0007 207 207 024 Pre-fail Always - 344 (Average 293) 4 Start_Stop_Count 0x0012 099 099 000 Old_age Always - 4121 5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0 7 Seek_Error_Rate 0x000a 100 100 067 Old_age Always - 0 8 Seek_Time_Performance 0x0004 128 128 020 Old_age Offline - 18 9 Power_On_Hours 0x0012 099 099 000 Old_age Always - 12042 10 Spin_Retry_Count 0x0012 100 100 060 Old_age Always - 0 12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 4120 22 Helium_Level 0x0023 100 100 025 Pre-fail Always - 100 192 Power-Off_Retract_Count 0x0032 097 097 000 Old_age Always - 4450 193 Load_Cycle_Count 0x0012 097 097 000 Old_age Always - 4450 194 Temperature_Celsius 0x0002 240 240 000 Old_age Always - 27 (Min/Max 12/55) 196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0 197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0 ... Column Breakdown ID#: Attribute identifier. ATTRIBUTE_NAME: Name of the attribute. FLAG: Attribute flags indicating how and when the attribute is updated. VALUE: Current normalized value of the attribute. Higher values are typically better. WORST: The worst (lowest) normalized value recorded for the attribute. THRESH: Threshold value below which the attribute is considered to have failed. TYPE: Indicates if the attribute is related to pre-failure (Pre-fail) or old age (Old_age). UPDATED: Indicates when the attribute is updated (Always or Offline). WHEN_FAILED: Indicates when the attribute failed, if applicable. RAW_VALUE: The raw, unprocessed value of the attribute. Attribute Details Raw_Read_Error_Rate\n Type: Pre-fail Current Value: 100 Worst Value: 100 Threshold: 16 Raw Value: 0 Interpretation: No read errors detected. Throughput_Performance\n Type: Old_age Current Value: 129 Worst Value: 129 Threshold: 54 Raw Value: 112 Interpretation: Good overall throughput performance. Spin_Up_Time\n Type: Pre-fail Current Value: 207 Worst Value: 207 Threshold: 24 Raw Value: 344 (Average 293) Interpretation: Spin-up time is within acceptable range. Start_Stop_Count\n Type: Old_age Current Value: 99 Worst Value: 99 Threshold: 0 Raw Value: 4121 Interpretation: The drive has been started and stopped 4121 times. Reallocated_Sector_Ct\n Type: Pre-fail Current Value: 100 Worst Value: 100 Threshold: 5 Raw Value: 0 Interpretation: No sectors have been reallocated. Seek_Error_Rate\n Type: Old_age Current Value: 100 Worst Value: 100 Threshold: 67 Raw Value: 0 Interpretation: No seek errors detected. Seek_Time_Performance\n Type: Old_age Current Value: 128 Worst Value: 128 Threshold: 20 Raw Value: 18 Interpretation: Seek time performance is good. Power_On_Hours\n Type: Old_age Current Value: 99 Worst Value: 99 Threshold: 0 Raw Value: 12042 Interpretation: The drive has been powered on for 12,042 hours. Spin_Retry_Count\n Type: Old_age Current Value: 100 Worst Value: 100 Threshold: 60 Raw Value: 0 Interpretation: No spin-up retries have occurred. Power_Cycle_Count\n Type: Old_age Current Value: 99 Worst Value: 99 Threshold: 0 Raw Value: 4120 Interpretation: The drive has gone through 4,120 power cycles. Helium_Level\n Type: Pre-fail Current Value: 100 Worst Value: 100 Threshold: 25 Raw Value: 100 Interpretation: Helium level is within acceptable range. Power-Off_Retract_Count - Type: Old_age - Current Value: 97 - Worst Value: 97 - Threshold: 0 - Raw Value: 4450 - Interpretation: The head has been retracted 4,450 times during power-off.\n Load_Cycle_Count - Type: Old_age - Current Value: 97 - Worst Value: 97 - Threshold: 0 - Raw Value: 4450 - Interpretation: The drive\u0026rsquo;s heads have been loaded and unloaded 4,450 times.\n Temperature_Celsius - Type: Old_age - Current Value: 240 - Worst Value: 240 - Threshold: 0 - Raw Value: 27 (Min/Max 12/55) - Interpretation: The current temperature is 27°C, with a range of 12°C to 55°C.\n Reallocated_Event_Count - Type: Old_age - Current Value: 100 - Worst Value: 100 - Threshold: 0 - Raw Value: 0 - Interpretation: No reallocation events have occurred.\n Current_Pending_Sector - Type: Old_age - Current Value: 100 - Worst Value: 100 - Threshold: 0 - Raw Value: 0 - Interpretation: No sectors are pending reallocation.\n Offline_Uncorrectable - Type: Old_age - Current Value: 100 - Worst Value: 100 - Threshold: 0 - Raw Value: 0 - Interpretation: No uncorrectable errors detected during offline scans.\n UDMA_CRC_Error_Count - Type: Old_age - Current Value: 200 - Worst Value: 200 - Threshold: 0 - Raw Value: 0 - Interpretation: No CRC errors detected.\n Summary The drive appears to be in good health, with no significant errors or issues detected. The key pre-fail and old-age indicators are within acceptable ranges, and no attributes have exceeded their threshold values.\nsmartctl usage reference % smartctl smartctl 7.4 2023-08-01 r5530 [Darwin 23.5.0 arm64] (local build) Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org ERROR: smartctl requires a device name as the final command-line argument. Use smartctl -h to get a usage summary (venv) ming@M2 djangocas-homepage % smartctl -h smartctl 7.4 2023-08-01 r5530 [Darwin 23.5.0 arm64] (local build) Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org Usage: smartctl [options] device ============================================ SHOW INFORMATION OPTIONS ===== -h, --help, --usage Display this help and exit -V, --version, --copyright, --license Print license, copyright, and version information and exit -i, --info Show identity information for device --identify[=[w][nvb]] Show words and bits from IDENTIFY DEVICE data (ATA) -g NAME, --get=NAME Get device setting: all, aam, apm, dsn, lookahead, security, wcache, rcache, wcreorder, wcache-sct -a, --all Show all SMART information for device -x, --xall Show all information for device --scan Scan for devices --scan-open Scan for devices and try to open each device ================================== SMARTCTL RUN-TIME BEHAVIOR OPTIONS ===== -j, --json[=cgiosuvy] Print output in JSON or YAML format -q TYPE, --quietmode=TYPE (ATA) Set smartctl quiet mode to one of: errorsonly, silent, noserial -d TYPE, --device=TYPE Specify device type to one of: ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbasm1352r,N, usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntasmedia, sntjmicron[,NSID], sntrealtek, jmb39x[-q],N[,sLBA][,force][+TYPE], jms56x,N[,sLBA][,force][+TYPE], auto, test -T TYPE, --tolerance=TYPE (ATA) Tolerance: normal, conservative, permissive, verypermissive -b TYPE, --badsum=TYPE (ATA) Set action on bad checksum to one of: warn, exit, ignore -r TYPE, --report=TYPE Report transactions (see man page) -n MODE[,STATUS[,STATUS2]], --nocheck=MODE[,STATUS[,STATUS2]] (ATA, SCSI) No check if: never, sleep, standby, idle (see man page) ============================== DEVICE FEATURE ENABLE/DISABLE COMMANDS ===== -s VALUE, --smart=VALUE Enable/disable SMART on device (on/off) -o VALUE, --offlineauto=VALUE (ATA) Enable/disable automatic offline testing on device (on/off) -S VALUE, --saveauto=VALUE (ATA) Enable/disable Attribute autosave on device (on/off) -s NAME[,VALUE], --set=NAME[,VALUE] Enable/disable/change device setting: aam,[N|off], apm,[N|off], dsn,[on|off], lookahead,[on|off], security-freeze, standby,[N|off|now], wcache,[on|off], rcache,[on|off], wcreorder,[on|off[,p]], wcache-sct,[ata|on|off[,p]] ======================================= READ AND DISPLAY DATA OPTIONS ===== -H, --health Show device SMART health status -c, --capabilities (ATA, NVMe) Show device SMART capabilities -A, --attributes Show device SMART vendor-specific Attributes and values -f FORMAT, --format=FORMAT (ATA) Set output format for attributes: old, brief, hex[,id|val] -l TYPE, --log=TYPE Show device log. TYPE: error, selftest, selective, directory[,g|s], xerror[,N][,error], xselftest[,N][,selftest], background, sasphy[,reset], sataphy[,reset], scttemp[sts,hist], scttempint,N[,p], scterc[,N,M][,p|reset], devstat[,N], defects[,N], ssd, gplog,N[,RANGE], smartlog,N[,RANGE], nvmelog,N,SIZE tapedevstat, zdevstat, envrep, farm -v N,OPTION , --vendorattribute=N,OPTION (ATA) Set display OPTION for vendor Attribute N (see man page) -F TYPE, --firmwarebug=TYPE (ATA) Use firmware bug workaround: none, nologdir, samsung, samsung2, samsung3, xerrorlba, swapid -P TYPE, --presets=TYPE (ATA) Drive-specific presets: use, ignore, show, showall -B [+]FILE, --drivedb=[+]FILE (ATA) Read and replace [add] drive database from FILE [default is +/opt/homebrew/etc/smart_drivedb.h and then /opt/homebrew/Cellar/smartmontools/7.4/share/smartmontools/drivedb.h] ============================================ DEVICE SELF-TEST OPTIONS ===== -t TEST, --test=TEST Run test. TEST: offline, short, long, conveyance, force, vendor,N, select,M-N, pending,N, afterselect,[on|off] -C, --captive Do test in captive mode (along with -t) -X, --abort Abort any non-captive test on device =================================================== SMARTCTL EXAMPLES ===== smartctl -a disk0 (Prints all SMART information) smartctl -t long /dev/disk0 (Executes extended disk self-test) smartctl --smart=on --saveauto=on /dev/rdisk0 (Enables SMART on first disk) smartctl --attributes --log=selftest --quietmode=errorsonly /dev/disk0 (Prints Self-Test \u0026amp; Attribute errors) smartctl -a IOService:/MacRISC2PE/pci@f4000000/AppleMacRiscPCI/ata-6@D/AppleKauaiATA/ATADeviceNub@0/IOATABlockStorageDriver/IOATABlockStorageDevice (You can use IOService: ...) smartctl -c IODeviceTree:/pci@f4000000/ata-6@D/@0:0 (... Or IODeviceTree:) Summary By running smartctl tests periodically, you can monitor the health of your storage devices and preemptively address potential failures.\n","excerpt":"What is smartctl smartctl is a powerful tool for monitoring the health and performance of your …","ref":"https://djangocas.dev/blog/linux/smartctl-explained-usage-examples/","title":"smartctl output explained and usage examples"},{"body":"The termination reason 0xdead10cc indicates that an iOS app was terminated by the system because it held on to a system resource (like a file or network connection) while running in the background. This typically happens when an app does not release a resource after being told to suspend, leading the system to kill the app to maintain overall system health.\nSample crash from RUNNINGBOARD 0xdead10cc:\n... Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: RUNNINGBOARD 0xdead10cc Triggered by Thread: 0 Kernel Triage: VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get ... How to troubleshooting RUNNINGBOARD 0xdead10cc crash issue?\nReview Background Tasks Check your app\u0026rsquo;s background tasks. Ensure that all tasks are properly ended before the app transitions to the background. Use the applicationDidEnterBackground: and applicationWillTerminate: methods in your app delegate to manage tasks.\nAudit Resource Usage Audit your code for places where you might be holding onto system resources like file handles or network connections. Make sure to release or close these resources when the app is about to enter the background.\nBackground Task API If you need to run background tasks, use the appropriate APIs like UIBackgroundTaskIdentifier for short tasks. For longer tasks, consider using background fetch or push notifications to trigger content updates.\nTo use the Background Task API in iOS for executing tasks in the background, you need to follow these steps:\n Register Background Tasks: In your app\u0026rsquo;s Info.plist, add the UIBackgroundModes key with the fetch and processing values to declare the use of background tasks. Request Permission: In iOS 13 and later, explicitly request permission to schedule background tasks. Define and Schedule Tasks: Use BGTaskScheduler to define and schedule your tasks. Here\u0026rsquo;s a sample code snippet demonstrating these steps:\nimport UIKit import BackgroundTasks class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -\u0026gt; Bool { // Register your background task BGTaskScheduler.shared.register(forTaskWithIdentifier: \u0026#34;com.yourapp.refresh\u0026#34;, using: nil) { task in // Downcast the parameter to an app refresh task as this identifier is used for a refresh request. self.handleAppRefresh(task: task as! BGAppRefreshTask) } return true } func applicationDidEnterBackground(_ application: UIApplication) { scheduleAppRefresh() } func scheduleAppRefresh() { let request = BGAppRefreshTaskRequest(identifier: \u0026#34;com.yourapp.refresh\u0026#34;) request.earliestBeginDate = Date(timeIntervalSinceNow: 1 * 60) // Fetch no earlier than 1 minute from now do { try BGTaskScheduler.shared.submit(request) } catch { print(\u0026#34;Could not schedule app refresh: \\(error)\u0026#34;) } } func handleAppRefresh(task: BGAppRefreshTask) { // Schedule a new refresh task scheduleAppRefresh() // Provide an expiration handler for the task task.expirationHandler = { // This block is called if the task expired; cancel any external requests } // Perform the background task updateData() // Call the completion handler once the task is done task.setTaskCompleted(success: true) } func updateData() { // Perform your data fetching or processing here } } This example demonstrates how to register and schedule a background app refresh task. It includes registering the task in didFinishLaunchingWithOptions, scheduling the task in applicationDidEnterBackground, and handling the task execution in a specific method (handleAppRefresh). Remember to replace \u0026ldquo;com.yourapp.refresh\u0026rdquo; with an identifier specific to your app.\nImportant: Always test background tasks thoroughly, as iOS imposes strict limits on background execution time and frequency to preserve battery life and improve user experience.\nDebugging and Logging Add extensive logging around your background tasks and resource management. Look for logs that indicate tasks not completing or resources not being released. Use Xcode\u0026rsquo;s debug tools to simulate background mode and observe your app\u0026rsquo;s behavior.\nReview App Lifecycle Ensure your app correctly handles transitions between foreground, background, and suspended states. Implement the delegate methods in UIApplicationDelegate to manage these transitions.\nOptimize for Quick Suspension Optimize your app to be ready for suspension as quickly as possible. This means efficiently managing tasks and resources so that when applicationDidEnterBackground: is called, your app can quickly clean up.\niOS Background Execution Limits There are iOS background execution limits, there is good summary at https://developer.apple.com/forums/thread/685525 . Excerpt here in case link broken.\niOS provides some general-purpose mechanisms for background execution:\n To resume your app in the background in response to an event on your server, use a background notification (aka a ‘silent’ push). For more information, see Pushing background updates to your App. To request a small amount of background execution time to refresh your UI, use BGAppRefreshTaskRequest. To request extended background execution time, typically delivered overnight when the user is asleep, use BGProcessingTaskRequest. To prevent your app from being suspended for a short period of time so that you can complete some user task, use a UIApplication background task. For more information on this, see UIApplication Background Task Notes. To download or upload a large HTTP resource, use an NSURLSession background session. All of these mechanisms prevent you from abusing them to run arbitrary code in the background. As an example, consider the NSURLSession resume rate limiter.\nFor more information about these limitations, and background execution in general, I strongly recommend that you watch WWDC 2020 Session 10063 Background execution demystified. It’s an excellent resource.\nSpecifically, this talk addresses a common misconception about the app refresh mechanism (BGAppRefreshTaskRequest and the older background fetch API). Folks assume that app refresh will provide regular background execution time. That’s not the case. The system applies a range of heuristics to decide which apps get app refresh time and when. This is a complex issue, one that I’m not going to try to summarise here, but the take-home message is that, if you expect that the app refresh mechanism will grant you background execution time, say, every 15 minutes, you’ll be disappointed. In fact, there are common scenarios where it won’t grant you any background execution time at all! Watch the talk for the details.\nWhen the user ‘force quits’ an app by swiping up in the multitasking UI, iOS interprets that to mean that the user doesn’t want the app running at all. So:\n If the app is running, iOS terminates it. iOS also sets a flag that prevents the app from being launched in the background. That flag gets cleared when the user next launches the app manually. This gesture is a clear statement of user intent; there’s no documented way for your app to override the user’s choice.\nNote: In some circumstances iOS will not honour this flag. The exact cases where this happens are not documented and have changed over time.\nSQLite crash related 0xdead10cc Avoid keeping the SQLite database in the shared container to prevent persistent crashes. Instead of allowing extensions to directly read/write the database, use alternative communication methods like Darwin notifications or writing plist files in the shared container.\niOS will consistently terminate the app and generate a crash log if your app or extension has an open file handle to a file in a shared container during suspension.\n0xdead10cc happens, on iOS, when an application that enters the suspended state (not the background state) while holding a lock on an SQLite database stored in a shared container. Indeed, such a locked database would be impossible to use from other processes that want to use it (SQLite would refuse), because the suspended app has no opportunity to release this lock. That\u0026rsquo;s why iOS preemptively kills the app and removes the lock. By removing the lock, other processes can access the database. By killing the app, iOS makes sure the app won\u0026rsquo;t proceed using a database that\u0026rsquo;s no longer in the expected state.\nGRDB specific Locks are acquired when you use the database, and released when you stop using the database. Excuse the gross approximation, but it more or less looks like that:\n// Database is not locked try dbQueue.write { db in // Database is locked } // Database is not locked Testing Test your app extensively in scenarios where it transitions to the background. Use Xcode and Instruments to monitor resource usage and background activity.\nMore iOS Troubleshooting iOS objc_retain crash troubleshooting Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/\u0026hellip; iOS Background Execution Limits Understanding the exception types in a crash report EXC_CRASH (SIGKILL): Namespace RUNNINGBOARD, Code 0xdead10cc Technical Note TN2151: Understanding and Analyzing Application Crash Reports GRDB: 0xdead10cc when opening database in a watch extension #998 ","excerpt":"The termination reason 0xdead10cc indicates that an iOS app was terminated by the system because it …","ref":"https://djangocas.dev/blog/ios-runningboard-0xdead10cc-crash-troubleshooting/","title":"iOS RUNNINGBOARD 0xdead10cc crash troubleshooting"},{"body":"Crashes involving objc_retain typically occur due to memory management issues in Objective-C, such as over-releasing an object that has already been deallocated. Here\u0026rsquo;s a step-by-step plan to diagnose and potentially fix such crashes:\nSample crash from obj_retain:\nException Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000509def8f0 Exception Codes: 0x0000000000000001, 0x0000000509def8f0 VM Region Info: 0x509def8f0 is not in any region. Bytes after previous region: 8218671345 Bytes before following region: 46005290768 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO 300000000-320000000 [512.0M] rw-/rwx SM=PRV ---\u0026gt; GAP OF 0xca0000000 BYTES commpage (reserved) fc0000000-1000000000 [ 1.0G] ---/--- SM=NUL reserved VM address space (unallocated) Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [56545] Triggered by Thread: 1 Kernel Triage: VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter ... Thread 1 Crashed: 0 libobjc.A.dylib 0x00000001853f5468 objc_retain + 16 (:-1) ... Thread 3: 0 libsystem_kernel.dylib 0x00000001d660c338 fsync + 8 (:-1) 1 libsqlite3.dylib 0x00000001b73d5aa0 unixSync + 212 (sqlite3.c:44599) 2 libsqlite3.dylib 0x00000001b73deb54 syncJournal + 496 (sqlite3.c:68073) 3 libsqlite3.dylib 0x00000001b73d5660 sqlite3PagerCommitPhaseOne + 392 (sqlite3.c:70356) 4 libsqlite3.dylib 0x00000001b73c5d68 sqlite3BtreeCommitPhaseOne + 172 (sqlite3.c:80934) 5 libsqlite3.dylib 0x00000001b73c5930 vdbeCommit + 1136 (sqlite3.c:93952) 6 libsqlite3.dylib 0x00000001b739ec60 sqlite3VdbeHalt + 1352 (sqlite3.c:94362) 7 libsqlite3.dylib 0x00000001b73bfb50 sqlite3VdbeExec + 42536 (sqlite3.c:101084) 8 libsqlite3.dylib 0x00000001b73b4c6c sqlite3_step + 964 (sqlite3.c:97699) ... How to troubleshooting objc_retain crash issue?\nEnable Zombies in Xcode Go to Product \u0026gt; Scheme \u0026gt; Edit Scheme. Select the \u0026ldquo;Run\u0026rdquo; scheme on the left, then go to the \u0026ldquo;Diagnostics\u0026rdquo; tab. Check the \u0026ldquo;Enable Zombie Objects\u0026rdquo; option. This will help identify messages sent to deallocated instances.\nAnalyze Stack Trace Look at the crash stack trace to identify where the crash is happening. Pay attention to your own code rather than system libraries. Review Object Lifecycle Examine the lifecycle of the object that is being accessed when the crash occurs. Ensure that it is not being over-released or accessed after being deallocated. Use Instruments Use the Instruments tool in Xcode to track down memory leaks and reference cycles. Specifically, the Leaks and Allocations instruments can be very helpful. Audit Your Code Manually audit your code for proper memory management. Ensure that every retain has a corresponding release or autorelease. Look for patterns that might lead to premature deallocation. ARC vs. Manual Memory Management If you\u0026rsquo;re not using Automatic Reference Counting (ARC), consider converting to ARC if possible, as it can manage memory more safely. If converting to ARC is not feasible, review your manual memory management practices. Weak References Ensure that delegates and other references that could create retain cycles are marked as weak or assign to prevent them from retaining each other indefinitely. Thread Safety Make sure that objects are accessed in a thread-safe manner. Use synchronization mechanisms if necessary to prevent concurrent access issues. If your app uses concurrency, ensure that shared resources are properly synchronized. Accessing mutable shared resources from multiple threads without proper synchronization can lead to undefined behavior, including segmentation faults. In this crash, a \u0026ldquo;Segmentation fault: 11\u0026rdquo; error in iOS development typically indicates that your application is trying to access memory that it shouldn\u0026rsquo;t be. This can happen for a variety of reasons, such as dereferencing a null pointer, accessing memory beyond the bounds of an array, or using an object after it has been deallocated. It may also due to thread safety caused memory corruption, enable Zombie Objects in Xcode. This can help identify where your code is accessing objects that have already been released.\nMore iOS Troubleshooting Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/\u0026hellip; Understanding the exception types in a crash report ","excerpt":"Crashes involving objc_retain typically occur due to memory management issues in Objective-C, such …","ref":"https://djangocas.dev/blog/ios-objc_retain-crash-troubleshooting/","title":"iOS objc_retain crash troubleshooting"},{"body":"Install ffmpeg On Mac OS X, install with brew :\n$ brew install ffmpeg On Debian Linux:\n$ sudo apt-get install ffmpeg Convert audio file format to .mp3 Convert to mp3 format with libmp3lame LAME (libmp3lame) is a high quality MPEG Audio Layer III (MP3) encoder. LAME is now regarded as the top MP3 encoder for mid-high bitrates and variable bit rate (VBR). Quality and speed enhancements continue to be made, making LAME likely the only MP3 encoder still actively developed.\nUse libmp3lame to encode mp3 file, ffmpeg need compiled with --enable-libmp3lame.\nNote: After converted to mp3, the mp3tag also updated to keep the original audio info.\nEncoding mp3 with a fixed bitrate Convert .wav, .ape to .mp3 with 320kb/s bitrate (the highest quality) example:\n$ ffmpeg -i foo.ape -codec:a libmp3lame -b:a 320k output.mp3 Input #0, ape, from \u0026#39;foo.ape\u0026#39;: Metadata: Title : xx Artist : xx Album : xx Track : xx Genre : xx ALBUM ARTIST : xx Duration: 00:04:13.19, start: 0.000000, bitrate: 774 kb/s Stream #0:0: Audio: ape (APE / 0x20455041), 44100 Hz, stereo, s16p Stream mapping: Stream #0:0 -\u0026gt; #0:0 (ape (native) -\u0026gt; mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to \u0026#39;output.mp3\u0026#39;: Metadata: TIT2 : xx TPE1 : xx TALB : xx TRCK : xx TCON : xx ALBUM ARTIST : xx TSSE : Lavf59.16.100 Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s Metadata: encoder : Lavc59.18.100 libmp3lame size= 9893kB time=00:04:13.20 bitrate= 320.1kbits/s speed=49.7x video:0kB audio:9892kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.012410% Convert any audio format (.wav, .ape, .aiff, .flac etc) to .mp3 with 320kb/s bitrate (the highest quality) and also keep metadata example:\nffmpeg -i \u0026#34;$filename\u0026#34; -codec:a libmp3lame -b:a 320k -map_metadata 0 -id3v2_version 3 \u0026#34;$output\u0026#34; Encoding mp3 with variable bitrate Use the best variable rate with -q:a 0, the bitrate range is 220-260kb/s, example:\n$ ffmpeg -i foo.ape -codec:a libmp3lame -q:a 0 output.mp3 Input #0, ape, from \u0026#39;foo.ape\u0026#39;: Metadata: Title : xx Artist : xx Album : xx Track : xx Genre : xx ALBUM ARTIST : xx Duration: 00:04:13.19, start: 0.000000, bitrate: 774 kb/s Stream #0:0: Audio: ape (APE / 0x20455041), 44100 Hz, stereo, s16p Stream mapping: Stream #0:0 -\u0026gt; #0:0 (ape (native) -\u0026gt; mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to \u0026#39;output.mp3\u0026#39;: Metadata: TIT2 : xx TPE1 : xx TALB : xx TRCK : xx TCON : xx ALBUM ARTIST : xx TSSE : Lavf59.27.100 Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p Metadata: encoder : Lavc59.37.100 libmp3lame size= 7545kB time=00:04:13.20 bitrate= 244.1kbits/s speed=55.8x video:0kB audio:7544kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005450% Note: Since mp3 format is lossy encoding, use best variable bitrate -q:a 0 can get similar quality with fixed bitrate -b:a 320k but smaller file size.\nDefault mp3 encoding quality If do not specific encoding quality, the default is 128kb/s, see the last two lines of following example:\n$ ffmpeg -i foo.ape output.mp3 Input #0, ape, from \u0026#39;foo.ape\u0026#39;: Metadata: Title : xx Artist : xx Album : xx Track : xx Genre : xx ALBUM ARTIST : xx Duration: 00:04:13.19, start: 0.000000, bitrate: 774 kb/s Stream #0:0: Audio: ape (APE / 0x20455041), 44100 Hz, stereo, s16p Stream mapping: Stream #0:0 -\u0026gt; #0:0 (ape (native) -\u0026gt; mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to \u0026#39;output.mp3\u0026#39;: Metadata: TIT2 : xx TPE1 : xx TALB : xx TRCK : xx TCON : xx ALBUM ARTIST : xx TSSE : Lavf59.16.100 Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p Metadata: encoder : Lavc59.18.100 libmp3lame size= 3957kB time=00:04:13.20 bitrate= 128.0kbits/s speed= 48x video:0kB audio:3957kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.010391% Extract audio from video file $ ffmpeg -i foo.webm -vn -acodec libmp3lame -q:a 0 output.mp3 -vn disable video -acodec libmp3lame force audio use libmp3lame codec Convert any video format to .mp4 MP4 is widely used because it is highly compatible with most devices and platforms, offers efficient compression for small file sizes without sacrificing quality, and supports various types of multimedia content including video, audio, text, and images. It is ideal for streaming, editing, and general multimedia use, making it a versatile and standardized format.\nConvert to .mp4 may also compress video and save space, suitable transfer to mobile device.\nTo convert a video to MP4 using FFmpeg with x264 encoding, you can use the following command in the terminal:\nffmpeg -i \u0026#34;$input\u0026#34; -map_metadata 0 -crf 17 -c:v libx264 -c:a aac -b:a 256k \u0026#34;$output\u0026#34; -i \u0026quot;$input\u0026quot;: Specifies the input file, where $input is a variable representing the path to the source video. -map_metadata 0: Maps all metadata from the input file to the output file, preserving information such as title, author, and other tags. -crf 17: Sets the Constant Rate Factor (CRF) for the video encoding to 17. CRF controls the quality and size of the output video; lower values result in higher quality. A CRF of 17 typically produces visually lossless quality. -c:v libx264: Specifies the video codec to be used for encoding as H.264 (libx264), which is a widely used video compression standard known for its balance of quality and file size. -c:a aac: Specifies the audio codec to be used for encoding as Advanced Audio Coding (AAC), which is a standard for lossy audio compression. -b:a 256k: Sets the audio bitrate to 256 kbps, which determines the quality and size of the audio stream. Higher bitrates provide better audio quality. \u0026quot;$output\u0026quot;: Specifies the output file name and path, where $output is a variable representing the destination for the converted video file. More how to choose crf value:\n The range of the CRF scale is 0–51, where 0 is lossless (for 8 bit only, for 10 bit use -qp 0), 23 is the default, and 51 is worst quality possible. A lower value generally leads to higher quality, and a subjectively sane range is 17–28. Consider 17 or 18 to be visually lossless or nearly so; it should look the same or nearly the same as the input but it isn\u0026rsquo;t technically lossless. Trim a video to specific time range The following command takes input.mp4, starts extracting at 5 minutes and 20 seconds, and continues for 10 minutes, copying both the video and audio streams without re-encoding, and saves the result as output.mp4:\nffmpeg -i input.mp4 -ss 00:05:20 -t 00:10:00 -c:v copy -c:a copy output.mp4 -i input.mp4: This specifies the input file, which in this case is input.mp4. -ss 00:05:20: This sets the start time of the extraction. The video will start from 5 minutes and 20 seconds into the input.mp4 file. -t 00:10:00: This specifies the duration of the extraction. The command will extract a segment that is 10 minutes long starting from the -ss time (5 minutes and 20 seconds). -c:v copy: This tells ffmpeg to copy the video codec, meaning it will not re-encode the video stream but just copy it as is. -c:a copy: This tells ffmpeg to copy the audio codec, meaning it will not re-encode the audio stream but just copy it as is. output.mp4: This is the name of the output file that will contain the extracted video segment. The -c:v copy -c:a copy commands copy the original video and audio streams without re-encoding.\nTo specify the time, you can use two different time unit formats: sexagesimal (HOURS:MM:SS.MILLISECONDS, e.g., 01:23:45.678) or in seconds. When using the former, you can omit the milliseconds and use HOURS:MM:SS, as shown in our example.\nIf you specify a duration that extends beyond the length of the input video, the output video will end when the input video ends.\nResize video retain aspect ratio To resize a video using FFmpeg, you can use the following command:\nffmpeg -i input.ext -vf scale=width:height output.mp4 Replace input.ext with the name of your source video file, width and height with the desired dimensions, and output.mp4 with the desired name for the resized video file.\nFor example, to resize a video to 1280x720 resolution, you can use:\nffmpeg -i inputfile.ext -vf scale=1280:720 outputfile.mp4 If you want to maintain the aspect ratio while resizing, you can use:\nffmpeg -i inputfile.ext -vf scale=1280:-1 outputfile.mp4 Here, -1 automatically adjusts the height to maintain the aspect ratio based on the specified width.\nHowever it may run into issue height not divisible by 2 like below:\n libx264 @ 0x12a905e60] height not divisible by 2 (320x693)\n To resize a video using FFmpeg and keep aspect ratio, you can use the following script to avoid height not divisible by 2 issue:\n#!/bin/sh -x # desired video width WIDTH=480 INPUT=$1 BASENAME=\u0026#34;${INPUT%.*}\u0026#34; # without extension, e.g. \u0026#34;foo.mp4\u0026#34; -\u0026gt; \u0026#34;foo\u0026#34; OUTPUT=\u0026#34;$BASENAME-${WIDTH}p.mp4\u0026#34; # output as .mp4 # not use`scale=width:-1` to avoid [libx264 @ 0x12a905e60] height not divisible by 2 (320x693) ffmpeg -i \u0026#34;$INPUT\u0026#34; -vf \u0026#34;scale=$WIDTH:ceil(ih*$WIDTH/iw/2)*2\u0026#34; -y \u0026#34;$OUTPUT\u0026#34; Explanation:\n -vf \u0026quot;scale=$WIDTH:ceil(ih*$WIDTH/iw/2)*2\u0026quot;: Applies a video filter (-vf) to resize the video. The scale filter resizes the video to a specified width and calculates the height to maintain the aspect ratio. $WIDTH: The desired width of the output video. ceil(ih*$WIDTH/iw/2)*2: Calculates the height while maintaining the aspect ratio. Here, ih is the input height, and iw is the input width. ih*$WIDTH/iw computes the new height maintaining the aspect ratio. /2)*2 ensures the height is an even number, which is required by many video codecs. The ceil function rounds up to the nearest integer. -y: Overwrites the output file without asking for confirmation if it already exists. Extract video cover image with exiftool Use exiftool -json example.mp4 to get cover image tag name. The name may \u0026ldquo;CoverArt\u0026rdquo;, \u0026ldquo;Picture\u0026rdquo; etc. e.g.\n$ exiftool -json example.mp4 \u0026#34;CoverArt\u0026#34;: \u0026#34;(Binary data 31650 bytes, use -b option to extract)\u0026#34;, Here the tag name is CoverArt, then extract with -b, by default it dump the image binary on screen, use \u0026gt; to redirect to a file:\nexiftool -b -CoverArt example.mp4 \u0026gt; cover.jpg Add covert image (thumbnail) to a video To add an embedded cover/thumbnail:\nffmpeg -i example.mp4 -i cover.jpg -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic out.mp4 Not all muxers support embedded thumbnails, and those who do, only support a few formats, like JPEG or PNG.\nNote: Use png even your cover.jpg is jpg format, otherwise you may not able to see it in Finder Preview.\nReferences wikipedia: MP3 FFmpeg Codecs Documentation for libmp3lame FFmpeg MP3 Encoding Guide The LAME Project ffmpeg Command Options ","excerpt":"Install ffmpeg On Mac OS X, install with brew :\n$ brew install ffmpeg On Debian Linux:\n$ sudo …","ref":"https://djangocas.dev/blog/ffmpeg/ffmpeg-convert-video-audio-examples/","title":"ffmpeg Convert Video Audio Examples"},{"body":"Problem You have a TextField in your iOS app, and you want to automatically select all the text inside it when a user taps on it.\nWhen working with iOS SwiftUI app development, you might encounter a common user interface requirement: the need to select or highlight all text within a `TextField`` when a user taps inside it. This behavior is similar to what you see in web browsers like Safari when you click inside the address bar. In this tutorial, we\u0026rsquo;ll explore how to achieve this functionality in your iOS app using Swift and SwiftUI.\nSolution We can accomplish this task by listening to the UITextField.textDidBeginEditingNotification event and then using relevant UITextField APIs to select all the text. There are two approaches to achieve this:\nApproach 1: Using textField.selectAll() In this approach, we\u0026rsquo;ll call the selectAll() method on the UITextField to select all the text when the text field begins editing. Here\u0026rsquo;s how you can implement it:\nimport SwiftUI import Combine TextField(\u0026#34;Search key words...\u0026#34;, text: $keywords) .padding() .onReceive(NotificationCenter.default.publisher(for: UITextField.textDidBeginEditingNotification)) { obj in // Click to select all the text. if let textField = obj.object as? UITextField { textField.selectAll(nil) } } With this code, when the user taps inside the text field, all the text will be automatically selected.\nApproach 2: Using textField.selectedTextRange In this approach, we\u0026rsquo;ll set the selectedTextRange property of the UITextField to select all the text. Here\u0026rsquo;s how you can implement it:\nimport SwiftUI import Combine TextField(\u0026#34;Search key words...\u0026#34;, text: $keywords) .padding() .onReceive(NotificationCenter.default.publisher(for: UITextField.textDidBeginEditingNotification)) { obj in // Click to select all the text. if let textField = obj.object as? UITextField { textField.selectedTextRange = textField.textRange(from: textField.beginningOfDocument, to: textField.endOfDocument) } } In this code, it will have the same effect as the first approach, selecting all the text when the text field begins editing.\nConclusion Selecting all text in a TextField`` when a user taps inside it is a common user interface requirement in iOS app development. By using the UITextField.textDidBeginEditingNotification` event and appropriate UITextField APIs, you can easily achieve this functionality and provide a seamless user experience in your iOS app.\nRelated pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information Guide: Jailbreaking Apple TV 4K iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc. Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD) Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... What\u0026#39;s new in SwiftUI iOS 16.4 beta 2 ","excerpt":"Problem You have a TextField in your iOS app, and you want to automatically select all the text …","ref":"https://djangocas.dev/blog/ios/swiftui-how-to-tap-select-all-text-in-textfield-ios/","title":"SwiftUI: How to Tap to Select All Text in a TextField on iOS"},{"body":"What is Hugo Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.\nIf you\u0026rsquo;re a web developer or a blogger using Hugo, you\u0026rsquo;ve probably heard of shortcodes. Shortcodes are one of the many powerful features that make Hugo, a static site generator, so versatile and user-friendly. In this article, we\u0026rsquo;ll dive into the world of Hugo shortcodes, exploring what they are, how to create them, and how to use them effectively with real-world examples.\nWhat Are Hugo Shortcodes? Hugo shortcodes are small, reusable snippets of code that allow you to insert dynamic content or complex functionality into your Hugo content files. They provide a way to keep your content DRY (Don\u0026rsquo;t Repeat Yourself) and make it easier to manage and maintain your Hugo site.\nShortcodes are typically enclosed in double curly braces, like\n{{\u0026lt; myshortcode param1=\u0026quot;value1\u0026quot; param2=\u0026quot;value2\u0026quot; \u0026gt;}} and they can be used for a wide range of purposes, from embedding videos and images to creating custom components and widgets.\nCreating Your Own Hugo Shortcodes Creating your own Hugo shortcode is a straightforward process. Here\u0026rsquo;s a step-by-step guide:\n Choose a Name: Pick a name for your shortcode that is unique and easy to remember. It\u0026rsquo;s a good practice to use lowercase letters and hyphens for readability. For example, if you\u0026rsquo;re creating a shortcode to embed a YouTube video, you might name it youtube.\n Create a New HTML File: In your Hugo project\u0026rsquo;s layouts/shortcodes directory, create a new HTML file with the same name as your shortcode. For example, if your shortcode is named youtube, create a file called youtube.html.\n Define the Shortcode Template: Inside the youtube.html file, define the HTML and Go template code that makes up your shortcode. Here\u0026rsquo;s a simple example for embedding a YouTube video:\n \u0026lt;iframe src=\u0026quot;https://www.youtube.com/embed/{{ .Get \u0026quot;video_id\u0026quot; }}\u0026quot; frameborder=\u0026quot;0\u0026quot; allowfullscreen\u0026gt;\u0026lt;/iframe\u0026gt; In this example, we use the .Get method to retrieve the value of the video_id parameter passed to the shortcode.\nAdd Parameters (Optional): You can make your shortcode more versatile by allowing users to pass parameters. To do this, define the parameters in the shortcode\u0026rsquo;s front matter:\n---title:\u0026#34;My Hugo Shortcode\u0026#34;parameters:- name:\u0026#34;video_id\u0026#34;type:\u0026#34;string\u0026#34;---Use Your Shortcode: Now that you\u0026rsquo;ve created your shortcode, you can use it in your Hugo content files. For example:\nHere\u0026rsquo;s an embedded YouTube video:\n{{\u0026lt; youtube video_id=\u0026quot;your_video_id_here\u0026quot; \u0026gt;}} Using Hugo Shortcodes: Examples Let\u0026rsquo;s explore some practical examples of Hugo shortcodes to give you a better understanding of their versatility.\nEmbedding a YouTube Video We\u0026rsquo;ve already seen how to create a youtube shortcode. Here\u0026rsquo;s how you can use it:\n{{\u0026lt; youtube video_id=\u0026quot;your_video_id_here\u0026quot; \u0026gt;}} Highlighting Code Blocks You can create a code shortcode to highlight code blocks with syntax highlighting:\n{{\u0026lt; code language=\u0026quot;python\u0026quot; \u0026gt;}} func main() { fmt.Println(\u0026quot;Hello, Hugo Shortcodes!\u0026quot;) } {{\u0026lt; /code \u0026gt;}} Adding Custom Alerts Create an alert shortcode to add custom alerts to your content:\n{{\u0026lt; alert type=\u0026quot;info\u0026quot; \u0026gt;}} This is an informational message. {{\u0026lt; /alert \u0026gt;}} Displaying Images with Captions Use a figure shortcode for displaying images with captions:\n{{\u0026lt; figure src=\u0026quot;/images/my-image.jpg\u0026quot; alt=\u0026quot;A beautiful image\u0026quot; caption=\u0026quot;This is a beautiful image.\u0026quot; \u0026amp;#x25;}} Displaying all the pages with same tag Create a shortcode relatedpages in layouts/shortcodes/relatedpages.html, as following content:\n{{ with $tag := .Get 0 }} {{ with where site.RegularPages \u0026quot;Params.tags\u0026quot; \u0026quot;intersect\u0026quot; (slice $tag) }} {{ with where . \u0026quot;Permalink\u0026quot; \u0026quot;ne\u0026quot; $.Page.Permalink }} \u0026lt;h2\u0026gt;Related pages:\u0026lt;/h2\u0026gt; \u0026lt;ul\u0026gt; {{ range . }} \u0026lt;li\u0026gt;\u0026lt;a href=\u0026quot;{{ .RelPermalink }}\u0026quot;\u0026gt;{{ .LinkTitle }}\u0026lt;/a\u0026gt;\u0026lt;/li\u0026gt; {{ end }} \u0026lt;/ul\u0026gt; {{ end }} {{ end }} {{ else }} {{ errorf \u0026quot;The %q shortcode requires a tag name as parameter. See %s\u0026quot; .Name .Position }} {{ end }} Usage:\n{{\u0026lt;/* relatedpages \u0026quot;Hugo\u0026quot; \u0026gt;}} Related pages: Hugo: How to escape shortcode in markdown Add comments to Static blog like Hugo, Jekyll with Isso Tips on Hugo SEO Custom hugo RSS template Hugo troubleshooting: execute of template failed: can\u0026#39;t give argument to non-function Add git commit date as last update date in hugo page Conclusion Hugo shortcodes are a powerful tool in your static site generation arsenal. They allow you to extend the functionality of your Hugo site without diving into complex code. By creating your own custom shortcodes and using existing ones creatively, you can enhance the presentation and interactivity of your Hugo-powered website or blog. So, go ahead, experiment with shortcodes, and make your Hugo site stand out!\nReferences Hugo: Configure Markup ","excerpt":"What is Hugo Hugo is one of the most popular open-source static site generators. With its amazing …","ref":"https://djangocas.dev/blog/hugo/hugo-shortcodes/","title":"Demystifying Hugo Shortcodes: Your Ultimate Guide"},{"body":"Parsing URLs (Uniform Resource Locators) is a common task in web development and data processing. URLs are the addresses that identify resources on the internet, such as web pages, images, and documents. Python provides powerful libraries and tools to easily parse and manipulate URLs, enabling developers to extract specific components and perform various operations on them.\nIntroduction to URL Parsing URL parsing involves breaking down a URL into its constituent parts, such as the scheme (e.g., \u0026ldquo;http\u0026rdquo;), host (e.g., \u0026ldquo;www.example.com \u0026rdquo;), path (e.g., \u0026ldquo;/page\u0026rdquo;), query parameters (e.g., \u0026ldquo;key=value\u0026rdquo;), and more. Python provides several libraries to facilitate URL parsing, each with its own set of features and capabilities.\nUsing the urllib.parse Module The urllib.parse module is part of the Python standard library and offers functions to parse and manipulate URLs. It provides a comprehensive set of tools for handling URLs.\nExample: Parsing a Simple URL \u0026gt;\u0026gt;\u0026gt; from urllib.parse import urlparse \u0026gt;\u0026gt;\u0026gt; \u0026gt;\u0026gt;\u0026gt; url = \u0026#34;https://www.example.com/page?query=value\u0026#34; \u0026gt;\u0026gt;\u0026gt; parsed_url = urlparse(url) \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;Scheme:\u0026#34;, parsed_url.scheme) Scheme: https \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;Netloc:\u0026#34;, parsed_url.netloc) Netloc: www.example.com \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;Path:\u0026#34;, parsed_url.path) Path: /page \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;Query:\u0026#34;, parsed_url.query) Query: query=value \u0026gt;\u0026gt;\u0026gt; Example: Encode Query Parameters with urllib.parse.quote() vs urllib.parse.quote_plus() The urllib.parse.quote() and urllib.parse.quote_plus() functions from Python\u0026rsquo;s standard library are used to percent-encode strings, making them safe to use in URLs. Here\u0026rsquo;s how they differ:\nurllib.parse.quote() This function is used to percent-encode a string. It replaces special characters in the string using the %xx escape. For example, a space is replaced with %20. It\u0026rsquo;s useful when you need to encode a path segment or the part of a query string before the ?. urllib.parse.quote_plus() Similar to quote(), but it replaces space with + signs while quote() replace space with %20. It replace / with %2F while quote() does not replace /. This behavior is particularly useful when encoding form data in the query component of a URL, mimicking the behavior of encoding spaces as + in URLs, which is common in the context of form submissions. urllib.parse.quote() vs urllib.parse.quote_plus() examples:\n\u0026gt;\u0026gt;\u0026gt; import urllib.parse \u0026gt;\u0026gt;\u0026gt; urllib.parse.quote(\u0026#34;https://example.com/path?foo=bar+abc\u0026amp;a=ABC%20XYZ 123\u0026#34;) \u0026#39;https%3A//example.com/path%3Ffoo%3Dbar%2Babc%26a%3DABC%2520XYZ%20123\u0026#39; # `safe=\u0026#39;\u0026#39;` also replace `/` with `%2F` \u0026gt;\u0026gt;\u0026gt; urllib.parse.quote(\u0026#34;https://example.com/path?foo=bar+abc\u0026amp;a=ABC%20XYZ 123\u0026#34;, safe=\u0026#39;\u0026#39;) \u0026#39;https%3A%2F%2Fexample.com%2Fpath%3Ffoo%3Dbar%2Babc%26a%3DABC%2520XYZ%20123\u0026#39; \u0026gt;\u0026gt;\u0026gt; urllib.parse.quote_plus(\u0026#34;https://example.com/path?foo=bar+abc\u0026amp;a=ABC%20XYZ 123\u0026#34;) \u0026#39;https%3A%2F%2Fexample.com%2Fpath%3Ffoo%3Dbar%2Babc%26a%3DABC%2520XYZ+123\u0026#39; \u0026gt;\u0026gt;\u0026gt; url = \u0026#34;https://example.com/path?foo=bar+abc\u0026amp;a=ABC%20XYZ 123\u0026#34; \u0026gt;\u0026gt;\u0026gt; url = f\u0026#34;https://example.com?url={urllib.parse.quote_plus(url)}\u0026#34; \u0026gt;\u0026gt;\u0026gt; url \u0026#39;https://example.com?url=https%3A%2F%2Fexample.com%2Fpath%3Ffoo%3Dbar%2Babc%26a%3DABC%2520XYZ+123\u0026#39; Example: Extracting Query Parameters \u0026gt;\u0026gt;\u0026gt; from urllib.parse import parse_qs \u0026gt;\u0026gt;\u0026gt; \u0026gt;\u0026gt;\u0026gt; query_string = \u0026#34;key1=value1\u0026amp;key2=value2\u0026amp;key3=value3\u0026#34; \u0026gt;\u0026gt;\u0026gt; query_params = parse_qs(query_string) \u0026gt;\u0026gt;\u0026gt; \u0026gt;\u0026gt;\u0026gt; for key, values in query_params.items(): ... print(key, \u0026#34;:\u0026#34;, values) ... key1 : [\u0026#39;value1\u0026#39;] key2 : [\u0026#39;value2\u0026#39;] key3 : [\u0026#39;value3\u0026#39;] Advanced URL Parsing with the furl Library The furl library is a powerful and user-friendly option for parsing and manipulating URLs, including handling relative URLs.\npip3 install furl Example: Handling Relative URLs \u0026gt;\u0026gt;\u0026gt; from furl import furl \u0026gt;\u0026gt;\u0026gt; \u0026gt;\u0026gt;\u0026gt; base_url = \u0026#34;https://www.example.com/page/\u0026#34; \u0026gt;\u0026gt;\u0026gt; relative_url = \u0026#34;../otherpage\u0026#34; \u0026gt;\u0026gt;\u0026gt; absolute_url = furl(base_url).join(relative_url) \u0026gt;\u0026gt;\u0026gt; \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;Absolute URL:\u0026#34;, absolute_url.url) Absolute URL: https://www.example.com/otherpage Example: Combining and Resolving URLs \u0026gt;\u0026gt;\u0026gt; from furl import furl \u0026gt;\u0026gt;\u0026gt; \u0026gt;\u0026gt;\u0026gt; url1 = \u0026#34;https://www.example.com/page\u0026#34; \u0026gt;\u0026gt;\u0026gt; url2 = \u0026#34;otherdir/otherpage\u0026#34; \u0026gt;\u0026gt;\u0026gt; combined_url = furl(url1).join(url2) \u0026gt;\u0026gt;\u0026gt; \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;Combined URL:\u0026#34;, combined_url.url) Combined URL: https://www.example.com/otherdir/otherpage Related pages: Get the IP address of a network interface by its name in Python on Linux an Mac OS X Python: How to print literal curly brace { or } in f-string and format string Python unicode string lowercase and caseless match References Python3 standard library: urllib.parse — Parse URLs into components ","excerpt":"Parsing URLs (Uniform Resource Locators) is a common task in web development and data processing. …","ref":"https://djangocas.dev/blog/python/parse-urls-in-python-with-examples/","title":"How to Parse URLs in Python: A Comprehensive Guide with Examples"},{"body":"This page contains the complete Xcode release history, including the download link, release notes, compiler information, SDK version details, and system requirements for macOS installation. Additionally, you can find download links for XIP and DMG files for older Xcode versions.\nXcode Release 26.2 (build 17C52) at 2025-12-12 Xcode Version: 26.2 (build 17C52) Release Date: 2025-12-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2/Xcode_26.2_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C53) macOS: Version 26.2 (build 25C57) tvOS: Version 26.2 (build 23K50) visionOS: Version 26.2 (build 23N301) watchOS: Version 26.2 (build 23S303) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2.3 (build 6.2.3.3.21) Checksums: sha1: cdd9d759ab081b08a119f1c49dbc25cd003fa07c Back to all xcode release list Xcode Release 26.2 (build 17C52) at 2025-12-12 Xcode Version: 26.2 (build 17C52) Release Date: 2025-12-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2/Xcode_26.2_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C53) macOS: Version 26.2 (build 25C57) tvOS: Version 26.2 (build 23K50) visionOS: Version 26.2 (build 23N301) watchOS: Version 26.2 (build 23S303) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2.3 (build 6.2.3.3.21) Checksums: sha1: d674471190edb578591b9bc00f10bdeba5752960 Back to all xcode release list Xcode Release 26.2 (build 17C48) at 2025-12-3 Xcode Version: 26.2 (build 17C48) Release Date: 2025-12-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2_Release_Candidate/Xcode_26.2_Release_Candidate_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C50) macOS: Version 26.2 (build 25C54) tvOS: Version 26.2 (build 23K50) visionOS: Version 26.2 (build 23N301) watchOS: Version 26.2 (build 23S303) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2 (build 6.2.3.3.20) Checksums: sha1: 0203b58c14ed8287701953b8a9023939bfa01590 Back to all xcode release list Xcode Release 26.2 (build 17C48) at 2025-12-3 Xcode Version: 26.2 (build 17C48) Release Date: 2025-12-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2_Release_Candidate/Xcode_26.2_Release_Candidate_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C50) macOS: Version 26.2 (build 25C54) tvOS: Version 26.2 (build 23K50) visionOS: Version 26.2 (build 23N301) watchOS: Version 26.2 (build 23S303) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2 (build 6.2.3.3.20) Checksums: sha1: a05a91ccb61533acf2e23face14047240462e176 Back to all xcode release list Xcode Release 26.2 (build 17C5038g) Beta at 2025-11-18 Xcode Version: 26.2 (build 17C5038g) Beta Release Date: 2025-11-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2_beta_2/Xcode_26.2_beta_2_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C5044a) macOS: Version 26.2 (build 25C5048a) tvOS: Version 26.2 (build 23K5046a) visionOS: Version 26.2 (build 23N5296a) watchOS: Version 26.2 (build 23S5297a) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2 (build 6.2.3.3.20) Checksums: sha1: 82511e36905c5c9a2a6d25112b33d132adb2d6d7 Back to all xcode release list Xcode Release 26.2 (build 17C5038g) Beta at 2025-11-18 Xcode Version: 26.2 (build 17C5038g) Beta Release Date: 2025-11-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2_beta_2/Xcode_26.2_beta_2_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C5044a) macOS: Version 26.2 (build 25C5048a) tvOS: Version 26.2 (build 23K5046a) visionOS: Version 26.2 (build 23N5296a) watchOS: Version 26.2 (build 23S5297a) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2 (build 6.2.3.3.20) Checksums: sha1: b4dabd3fcb95d4dec660fed2d51016ac6b44573e Back to all xcode release list Xcode Release 26.1.1 (build 17B100) at 2025-11-11 Xcode Version: 26.1.1 (build 17B100) Release Date: 2025-11-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1.1/Xcode_26.1.1_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B77) macOS: Version 26.1 (build 25B74) tvOS: Version 26.1 (build 23J576) visionOS: Version 26.1 (build 23N45) watchOS: Version 26.1 (build 23S34) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2.1 (build 6.2.1.4.8) Checksums: sha1: 0a9744fab1e8c590701571902d69a2e97d627ac4 Back to all xcode release list Xcode Release 26.1.1 (build 17B100) at 2025-11-11 Xcode Version: 26.1.1 (build 17B100) Release Date: 2025-11-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1.1/Xcode_26.1.1_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B77) macOS: Version 26.1 (build 25B74) tvOS: Version 26.1 (build 23J576) visionOS: Version 26.1 (build 23N45) watchOS: Version 26.1 (build 23S34) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2.1 (build 6.2.1.4.8) Checksums: sha1: 96cb10e34bde5e26f5181e4a89ce2e955b38cd66 Back to all xcode release list Xcode Release 26.2 (build 17C5013i) Beta at 2025-11-4 Xcode Version: 26.2 (build 17C5013i) Beta Release Date: 2025-11-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2_beta/Xcode_26.2_beta_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C5027e) macOS: Version 26.2 (build 25C5031g) tvOS: Version 26.2 (build 23K5029d) visionOS: Version 26.2 (build 23N5279d) watchOS: Version 26.2 (build 23S5280d) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2 (build 6.2.3.3.2) Checksums: sha1: 1d076eb15f31d0e77f1c66018fe0518d351346f7 Back to all xcode release list Xcode Release 26.2 (build 17C5013i) Beta at 2025-11-4 Xcode Version: 26.2 (build 17C5013i) Beta Release Date: 2025-11-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.2_beta/Xcode_26.2_beta_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.2 (build 23C5027e) macOS: Version 26.2 (build 25C5031g) tvOS: Version 26.2 (build 23K5029d) visionOS: Version 26.2 (build 23N5279d) watchOS: Version 26.2 (build 23S5280d) Compilers: clang: Version 17.0.0 (build 1700.6.3.2) swift: Version 6.2 (build 6.2.3.3.2) Checksums: sha1: 2a97f4d9973c9d9b2b318711015b6f33b2153562 Back to all xcode release list Xcode Release 26.1 (build 17B55) at 2025-11-3 Xcode Version: 26.1 (build 17B55) Release Date: 2025-11-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1/XcodeXIP_26.1_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B77) macOS: Version 26.1 (build 25B74) tvOS: Version 26.1 (build 23J576) visionOS: Version 26.1 (build 23N45) watchOS: Version 26.1 (build 23S34) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2.1 (build 6.2.1.4.8) Checksums: sha1: 24df34c049bf695f2ef7262815828c52ed5479fe Back to all xcode release list Xcode Release 26.1 (build 17B55) at 2025-11-3 Xcode Version: 26.1 (build 17B55) Release Date: 2025-11-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1/XcodeXIP_26.1_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B77) macOS: Version 26.1 (build 25B74) tvOS: Version 26.1 (build 23J576) visionOS: Version 26.1 (build 23N45) watchOS: Version 26.1 (build 23S34) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2.1 (build 6.2.1.4.8) Checksums: sha1: 7ec74a99fb609ad4267296424190583decf52815 Back to all xcode release list Xcode Release 26.1 (build 17B54) at 2025-10-28 Xcode Version: 26.1 (build 17B54) Release Date: 2025-10-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_Release_Candidate/Xcode_26.1_Release_Candidate_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B77) macOS: Version 26.1 (build 25B74) tvOS: Version 26.1 (build 23J576) visionOS: Version 26.1 (build 23N45) watchOS: Version 26.1 (build 23S34) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2.1 (build 6.2.1.4.8) Checksums: sha1: 94f5540faf9f864908ccc8512cc9ddd3de9b615c Back to all xcode release list Xcode Release 26.1 (build 17B54) at 2025-10-28 Xcode Version: 26.1 (build 17B54) Release Date: 2025-10-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_Release_Candidate/Xcode_26.1_Release_Candidate_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B77) macOS: Version 26.1 (build 25B74) tvOS: Version 26.1 (build 23J576) visionOS: Version 26.1 (build 23N45) watchOS: Version 26.1 (build 23S34) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2.1 (build 6.2.1.4.8) Checksums: sha1: 4a7d988f053c98e0db34998176bf4e48195a46e0 Back to all xcode release list Xcode Release 26.1 (build 17B5045g) Beta at 2025-10-20 Xcode Version: 26.1 (build 17B5045g) Beta Release Date: 2025-10-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_beta_3/Xcode_26.1_beta_3_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B5072a) macOS: Version 26.1 (build 25B5070a) tvOS: Version 26.1 (build 23J5571a) visionOS: Version 26.1 (build 23N5041a) watchOS: Version 26.1 (build 23S5030a) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2 (build 6.2.1.4.6) Checksums: sha1: 9a9fe79bd96dba924ff717c5c462bf3936e95064 Back to all xcode release list Xcode Release 26.1 (build 17B5045g) Beta at 2025-10-20 Xcode Version: 26.1 (build 17B5045g) Beta Release Date: 2025-10-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_beta_3/Xcode_26.1_beta_3_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B5072a) macOS: Version 26.1 (build 25B5070a) tvOS: Version 26.1 (build 23J5571a) visionOS: Version 26.1 (build 23N5041a) watchOS: Version 26.1 (build 23S5030a) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2 (build 6.2.1.4.6) Checksums: sha1: 7f3fbf644d5b435855e64f54774608b4614b7283 Back to all xcode release list Xcode Release 26.1 (build 17B5035f) Beta at 2025-10-6 Xcode Version: 26.1 (build 17B5035f) Beta Release Date: 2025-10-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_beta_2/Xcode_26.1_beta_2_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B5059c) macOS: Version 26.1 (build 25B5057c) tvOS: Version 26.1 (build 23J5558c) visionOS: Version 26.1 (build 23N5028c) watchOS: Version 26.1 (build 23S5017c) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2 (build 6.2.1.4.2) Checksums: sha1: b6312e5d6625157959e3bca395a3014e7cae230d Back to all xcode release list Xcode Release 26.1 (build 17B5035f) Beta at 2025-10-6 Xcode Version: 26.1 (build 17B5035f) Beta Release Date: 2025-10-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_beta_2/Xcode_26.1_beta_2_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B5044i) macOS: Version 26.1 (build 25B5042i) tvOS: Version 26.1 (build 23J5558c) visionOS: Version 26.1 (build 23N5028c) watchOS: Version 26.1 (build 23S5017c) Compilers: clang: Version 17.0.0 (build 1700.4.4.1) swift: Version 6.2 (build 6.2.1.4.2) Checksums: sha1: c4dc14437900293544d44ce49c6ff1d60886a34a Back to all xcode release list Xcode Release 26.1 (build 17B5025f) Beta at 2025-9-22 Xcode Version: 26.1 (build 17B5025f) Beta Release Date: 2025-9-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_beta/Xcode_26.1_beta_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B5044i) macOS: Version 26.1 (build 25B5042i) tvOS: Version 26.1 (build 23J5543i) visionOS: Version 26.1 (build 23N5013i) watchOS: Version 26.1 (build 23S5002i) Compilers: clang: Version 17.0.0 (build 1700.4.1.2) swift: Version 6.2 (build 6.2.1.1.1) Checksums: sha1: c619d1bd4f86df5050f42f47a5134696b6cdb78f Back to all xcode release list Xcode Release 26.1 (build 17B5025f) Beta at 2025-9-22 Xcode Version: 26.1 (build 17B5025f) Beta Release Date: 2025-9-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.1_beta/Xcode_26.1_beta_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.1 (build 23B5044i) macOS: Version 26.1 (build 25B5042i) tvOS: Version 26.1 (build 23J5543i) visionOS: Version 26.1 (build 23N5013i) watchOS: Version 26.1 (build 23S5002i) Compilers: clang: Version 17.0.0 (build 1700.4.1.2) swift: Version 6.2 (build 6.2.1.1.1) Checksums: sha1: dd7219aeca1dc5791eacf0782ba23d5ea89b2748 Back to all xcode release list Xcode Release 26.0.1 (build 17A400) at 2025-9-22 Xcode Version: 26.0.1 (build 17A400) Release Date: 2025-9-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.0.1/Xcode_26.0.1_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_0_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.0 (build 23A339) macOS: Version 26.0 (build 25A352) tvOS: Version 26.0 (build 23J352) visionOS: Version 26.0 (build 23M336) watchOS: Version 26.0 (build 23R351) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: 906a700ec3c7157590d4aead34844c1703f54e50 Back to all xcode release list Xcode Release 26.0.1 (build 17A400) at 2025-9-22 Xcode Version: 26.0.1 (build 17A400) Release Date: 2025-9-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26.0.1/Xcode_26.0.1_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26_0_1-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.0 (build 23A339) macOS: Version 26.0 (build 25A352) tvOS: Version 26.0 (build 23J352) visionOS: Version 26.0 (build 23M336) watchOS: Version 26.0 (build 23R351) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: dd646dd0db083333e3d21048ef4ad3227f8fd584 Back to all xcode release list Xcode Release 26.0 (build 17A324) at 2025-9-15 Xcode Version: 26.0 (build 17A324) Release Date: 2025-9-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26/Xcode_26_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.0 (build 23A339) macOS: Version 26.0 (build 25A352) tvOS: Version 26.0 (build 23J352) visionOS: Version 26.0 (build 23M336) watchOS: Version 26.0 (build 23R351) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: 1a45bc64cecd134b46adaf5ee1ed577bd2e901c2 Back to all xcode release list Xcode Release 26.0 (build 17A324) at 2025-9-15 Xcode Version: 26.0 (build 17A324) Release Date: 2025-9-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26/Xcode_26_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.0 (build 23A339) macOS: Version 26.0 (build 25A352) tvOS: Version 26.0 (build 23J352) visionOS: Version 26.0 (build 23M336) watchOS: Version 26.0 (build 23R351) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: 6ff54e55537cc50c89cdc84085e4a4d151b58e9f Back to all xcode release list Xcode Release 26.0 (build 17A321) at 2025-9-9 Xcode Version: 26.0 (build 17A321) Release Date: 2025-9-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_Release_Candidate/Xcode_26_Release_Candidate_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.0 (build 23A337) macOS: Version 26.0 (build 25A352) tvOS: Version 26.0 (build 23J351) visionOS: Version 26.0 (build 23M335) watchOS: Version 26.0 (build 23R351) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: f6e0ca2990be217a06a3c3c18cd1e19668bcd3fa Back to all xcode release list Xcode Release 26.0 (build 17A321) at 2025-9-9 Xcode Version: 26.0 (build 17A321) Release Date: 2025-9-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_Release_Candidate/Xcode_26_Release_Candidate_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.6 SDKS: iOS: Version 26.0 (build 23A337) macOS: Version 26.0 (build 25A352) tvOS: Version 26.0 (build 23J351) visionOS: Version 26.0 (build 23M335) watchOS: Version 26.0 (build 23R351) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: a34d15dbce643221898b26673e6872b84cec9191 Back to all xcode release list Xcode Release 26.0 (build 17A5305k) Beta at 2025-8-28 Xcode Version: 26.0 (build 17A5305k) Beta Release Date: 2025-8-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_7/Xcode_26_beta_7_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5324a) macOS: Version 26.0 (build 25A5344a) tvOS: Version 26.0 (build 23J5344a) visionOS: Version 26.0 (build 23M5327a) watchOS: Version 26.0 (build 23R5344a) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: b94737c82ff755e5cbe2524ab627569ed98bda0c Back to all xcode release list Xcode Release 26.0 (build 17A5305k) Beta at 2025-8-28 Xcode Version: 26.0 (build 17A5305k) Beta Release Date: 2025-8-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_7/Xcode_26_beta_7_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5324a) macOS: Version 26.0 (build 25A5344a) tvOS: Version 26.0 (build 23J5344a) visionOS: Version 26.0 (build 23M5327a) watchOS: Version 26.0 (build 23R5344a) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: 09b82fab3f7661b05681def994485e8e8ef55974 Back to all xcode release list Xcode Release 26.0 (build 17A5305f) Beta at 2025-8-18 Xcode Version: 26.0 (build 17A5305f) Beta Release Date: 2025-8-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_6/Xcode_26_beta_6_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5324a) macOS: Version 26.0 (build 25A5344a) tvOS: Version 26.0 (build 23J5344a) visionOS: Version 26.0 (build 23M5327a) watchOS: Version 26.0 (build 23R5344a) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: 9bdd6dc1a5654fdbd4c432d1e2bd40266f0621bc Back to all xcode release list Xcode Release 26.0 (build 17A5305f) Beta at 2025-8-18 Xcode Version: 26.0 (build 17A5305f) Beta Release Date: 2025-8-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_6/Xcode_26_beta_6_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5324a) macOS: Version 26.0 (build 25A5344a) tvOS: Version 26.0 (build 23J5344a) visionOS: Version 26.0 (build 23M5327a) watchOS: Version 26.0 (build 23R5344a) Compilers: clang: Version 17.0.0 (build 1700.3.19.1) swift: Version 6.2 (build 6.2.0.19.9) Checksums: sha1: 302bd70d864c102796084abde3ba628fff2e01d3 Back to all xcode release list Xcode Release 26.0 (build 17A5295f) Beta at 2025-8-5 Xcode Version: 26.0 (build 17A5295f) Beta Release Date: 2025-8-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_5/Xcode_26_beta_5_Universal.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5308f) macOS: Version 26.0 (build 25A5327f) tvOS: Version 26.0 (build 23J5327f) visionOS: Version 26.0 (build 23M5311f) watchOS: Version 26.0 (build 23R5328f) Compilers: clang: Version 17.0.0 (build 1700.3.16.4) swift: Version 6.2 (build 6.2.0.16.4) Checksums: sha1: a303f632a63bcaefbaef9ce9de6f74f1b0addf61 Back to all xcode release list Xcode Release 26.0 (build 17A5295f) Beta at 2025-8-5 Xcode Version: 26.0 (build 17A5295f) Beta Release Date: 2025-8-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_5/Xcode_26_beta_5_Apple_silicon.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5308f) macOS: Version 26.0 (build 25A5327f) tvOS: Version 26.0 (build 23J5327f) visionOS: Version 26.0 (build 23M5311f) watchOS: Version 26.0 (build 23R5328f) Compilers: clang: Version 17.0.0 (build 1700.3.16.4) swift: Version 6.2 (build 6.2.0.16.4) Checksums: sha1: 9e2f71733915d5c3920217a49a05ab57c030056c Back to all xcode release list Xcode Release 26.0 (build 17A5285i) Beta at 2025-7-22 Xcode Version: 26.0 (build 17A5285i) Beta Release Date: 2025-7-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_4/Xcode_26_beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5297f) macOS: Version 26.0 (build 25A5316f) tvOS: Version 26.0 (build 23J5316f) visionOS: Version 26.0 (build 23M5300f) watchOS: Version 26.0 (build 23R5317f) Compilers: clang: Version 17.0.0 (build 1700.3.14.6) swift: Version 6.2 (build 6.2.0.14.8) Checksums: sha1: 64f30c98bc86d2d708d4d3517c5301252a991ce8 Back to all xcode release list Xcode Release 26.0 (build 17A5276g) Beta at 2025-7-8 Xcode Version: 26.0 (build 17A5276g) Beta Release Date: 2025-7-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_3/Xcode_26_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.5 SDKS: iOS: Version 26.0 (build 23A5287e) macOS: Version 26.0 (build 25A5306e) tvOS: Version 26.0 (build 23J5306e) visionOS: Version 26.0 (build 23M5290e) watchOS: Version 26.0 (build 23R5307e) Compilers: clang: Version 17.0.0 (build 1700.3.13.4) swift: Version 6.2 (build 6.2.0.13.10) Checksums: sha1: 1ecdf739e59785ecaf21040e627b491b17ae2ed7 Back to all xcode release list Xcode Release 26.0 (build 17A5241o) Beta at 2025-6-24 Xcode Version: 26.0 (build 17A5241o) Beta Release Date: 2025-6-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta_2/Xcode_26_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.4 SDKS: iOS: Version 26.0 (build 23A5276f) macOS: Version 26.0 (build 25A5295e) tvOS: Version 26.0 (build 23J5295f) visionOS: Version 26.0 (build 23M5279g) watchOS: Version 26.0 (build 23R5296f) Compilers: clang: Version 17.0.0 (build 1700.3.10.950) swift: Version 6.2 (build 6.2.0.10.950) Checksums: sha1: aea21d293e486a1a59b676cb1e0671794d7b71a7 Back to all xcode release list Xcode Release 26.0 (build 17A5241e) Beta at 2025-6-9 Xcode Version: 26.0 (build 17A5241e) Beta Release Date: 2025-6-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_26_beta/Xcode_26_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes Requires: Mac OSX 15.4 SDKS: iOS: Version 26.0 (build 23A5260k) macOS: Version 26.0 (build 25A5279m) tvOS: Version 26.0 (build 23J5279j) visionOS: Version 26.0 (build 23M5263k) watchOS: Version 26.0 (build 23R5280j) Compilers: clang: Version 17.0.0 (build 1700.3.9.908) swift: Version 6.2 (build 6.2.0.9.909) Checksums: sha1: 15a06036b7fcb16cbeff7a28d5964884e6a5de44 Back to all xcode release list Xcode Release 16.4 (build 16F6) at 2025-5-27 Xcode Version: 16.4 (build 16F6) Release Date: 2025-5-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.4/Xcode_16.4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_4-release-notes Requires: Mac OSX 15.3 SDKS: iOS: Version 18.5 (build 22F76) macOS: Version 15.5 (build 24F74) tvOS: Version 18.5 (build 22L572) visionOS: Version 2.5 (build 22O473) watchOS: Version 11.5 (build 22T572) Compilers: clang: Version 17.0.0 (build 1700.0.13.5) swift: Version 6.1.2 (build 6.1.2.1.2) Checksums: sha1: a4bdd0259a4b286011b7092b9345507a41831e2d Back to all xcode release list Xcode Release 16.4 (build 16F6) at 2025-5-15 Xcode Version: 16.4 (build 16F6) Release Date: 2025-5-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.4_Release_Candidate/Xcode_16.4_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_4-release-notes Requires: Mac OSX 15.3 SDKS: iOS: Version 18.5 (build 22F76) macOS: Version 15.5 (build 24F74) tvOS: Version 18.5 (build 22L572) visionOS: Version 2.5 (build 22O473) watchOS: Version 11.5 (build 22T572) Compilers: clang: Version 17.0.0 (build 1700.0.13.5) swift: Version 6.1.2 (build 6.1.2.1.2) Checksums: sha1: a4bdd0259a4b286011b7092b9345507a41831e2d Back to all xcode release list Xcode Release 16.4 (build 16F1t) Beta at 2025-4-28 Xcode Version: 16.4 (build 16F1t) Beta Release Date: 2025-4-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.4_beta/Xcode_16.4_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_4-release-notes Requires: Mac OSX 15.3 SDKS: iOS: Version 18.5 (build 22F5065a) macOS: Version 15.5 (build 24F5065a) tvOS: Version 18.5 (build 22L5564a) visionOS: Version 2.5 (build 22O5464a) watchOS: Version 11.5 (build 22T5564a) Compilers: clang: Version 17.0.0 (build 1700.0.13.5) swift: Version 6.1.2 (build 6.1.2.1.2) Checksums: sha1: 257754cead4dc67999b8608323d0423126b08ee9 Back to all xcode release list Xcode Release 16.3 (build 16E140) at 2025-3-31 Xcode Version: 16.3 (build 16E140) Release Date: 2025-3-31 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.3/Xcode_16.3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes Requires: Mac OSX 15.2 SDKS: iOS: Version 18.4 (build 22E235) macOS: Version 15.4 (build 24E241) tvOS: Version 18.4 (build 22L251) visionOS: Version 2.4 (build 22O233) watchOS: Version 11.4 (build 22T246) Compilers: clang: Version 17.0.0 (build 1700.0.13.3) swift: Version 6.1 (build 6.1.0.110.21) Checksums: sha1: ee92d71375179404898215488da6572fbc8e892c Back to all xcode release list Xcode Release 16.3 (build 16E140) at 2025-3-27 Xcode Version: 16.3 (build 16E140) Release Date: 2025-3-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.3_Release_Candidate_2/Xcode_16.3_Release_Candidate_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes Requires: Mac OSX 15.2 SDKS: iOS: Version 18.4 (build 22E235) macOS: Version 15.4 (build 24E241) tvOS: Version 18.4 (build 22L251) visionOS: Version 2.4 (build 22O233) watchOS: Version 11.4 (build 22T246) Compilers: clang: Version 17.0.0 (build 1700.0.13.3) swift: Version 6.1 (build 6.1.0.110.21) Checksums: sha1: ee92d71375179404898215488da6572fbc8e892c Back to all xcode release list Xcode Release 16.3 (build 16E137) at 2025-3-24 Xcode Version: 16.3 (build 16E137) Release Date: 2025-3-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.3_Release_Candidate/Xcode_16.3_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes Requires: Mac OSX 15.2 SDKS: iOS: Version 18.4 (build 22E235) macOS: Version 15.4 (build 24E241) tvOS: Version 18.4 (build 22L251) visionOS: Version 2.4 (build 22O233) watchOS: Version 11.4 (build 22T246) Compilers: clang: Version 17.0.0 (build 1700.0.13.3) swift: Version 6.1 (build 6.1.0.110.21) Checksums: sha1: caf62a8195fe3cc06ec896baa921e7c6cbc9222c Back to all xcode release list Xcode Release 16.3 (build 16E5129f) Beta at 2025-3-17 Xcode Version: 16.3 (build 16E5129f) Beta Release Date: 2025-3-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.3_beta_3/Xcode_16.3_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes Requires: Mac OSX 15.2 SDKS: iOS: Version 18.4 (build 22E5231a) macOS: Version 15.4 (build 24E5237a) tvOS: Version 18.4 (build 22L5249a) visionOS: Version 2.4 (build 22O5230a) watchOS: Version 11.4 (build 22T5243a) Compilers: clang: Version 17.0.0 (build 1700.0.13.3) swift: Version 6.1 (build 6.1.0.110.5) Checksums: sha1: a9b3720715a205d484b2cfa1b02483cd18749b3a Back to all xcode release list Xcode Release 16.3 (build 16E5121h) Beta at 2025-3-5 Xcode Version: 16.3 (build 16E5121h) Beta Release Date: 2025-3-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.3_beta_2/Xcode_16.3_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes Requires: Mac OSX 15.2 SDKS: iOS: Version 18.4 (build 22E5216d) macOS: Version 15.4 (build 24E5222d) tvOS: Version 18.4 (build 22L5234d) visionOS: Version 2.4 (build 22O5215d) watchOS: Version 11.4 (build 22T5228d) Compilers: clang: Version 17.0.0 (build 1700.0.13.2) swift: Version 6.1 (build 6.1.0.109.103) Checksums: sha1: 766157be0bb4674376313c8802b3b6e756534694 Back to all xcode release list Xcode Release 16.3 (build 16E5104o) Beta at 2025-2-21 Xcode Version: 16.3 (build 16E5104o) Beta Release Date: 2025-2-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.3_beta/Xcode_16.3_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes Requires: Mac OSX 15.2 SDKS: iOS: Version 18.4 (build 22E5200l) macOS: Version 15.4 (build 24E5206k) tvOS: Version 18.4 (build 22L5218k) visionOS: Version 2.4 (build 22O5199l) watchOS: Version 11.4 (build 22T5212l) Compilers: clang: Version 17.0.0 (build 1700.0.9.2) swift: Version 6.1 (build 6.1.0.106.4) Checksums: sha1: f192ff97ddc6bbab829bbb55a9a81e36de9504d5 Back to all xcode release list Xcode Release 16.2 (build 16C5032a) at 2024-12-11 Xcode Version: 16.2 (build 16C5032a) Release Date: 2024-12-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.2/Xcode_16.2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.2 (build 22C146) macOS: Version 15.2 (build 24C94) tvOS: Version 18.2 (build 22K152) visionOS: Version 2.2 (build 22N799) watchOS: Version 11.2 (build 22S97) Compilers: clang: Version 16.0.0 (build 1600.0.26.6) swift: Version 6.0.3 (build 6.0.3.1.10) Checksums: sha1: aa1a3f12d4217ab04ea4064f40e92399192e15f9 Back to all xcode release list Xcode Release 16.2 (build 16C5031c) at 2024-12-5 Xcode Version: 16.2 (build 16C5031c) Release Date: 2024-12-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.2_Release_Candidate/Xcode_16.2_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.2 (build 22C146) macOS: Version 15.2 (build 24C94) tvOS: Version 18.2 (build 22K152) visionOS: Version 2.2 (build 22N799) watchOS: Version 11.2 (build 22S97) Compilers: clang: Version 16.0.0 (build 1600.0.26.6) swift: Version 6.0.3 (build 6.0.3.1.9) Checksums: sha1: fae483d3092d181c900560a4def6ead39691c472 Back to all xcode release list Xcode Release 16.2 (build 16C5023f) Beta at 2024-11-20 Xcode Version: 16.2 (build 16C5023f) Beta Release Date: 2024-11-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.2_beta_3/Xcode_16.2_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.2 (build 22C5142a) macOS: Version 15.2 (build 24C5089c) tvOS: Version 18.2 (build 22K5148a) visionOS: Version 2.2 (build 22N5794a) watchOS: Version 11.2 (build 22S5094a) Compilers: clang: Version 16.0.0 (build 1600.0.26.6) swift: Version 6.0.3 (build 6.0.3.1.8) Checksums: sha1: b828d00a8a537e55ac77b9e11f06245faeb3365a Back to all xcode release list Xcode Release 16.2 (build 16C5013f) Beta at 2024-11-4 Xcode Version: 16.2 (build 16C5013f) Beta Release Date: 2024-11-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.2_beta_2/Xcode_16.2_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.2 (build 22C5125d) macOS: Version 15.2 (build 24C5073d) tvOS: Version 18.2 (build 22K5132d) visionOS: Version 2.2 (build 22N5778e) watchOS: Version 11.2 (build 22S5077c) Compilers: clang: Version 16.0.0 (build 1600.0.26.5) swift: Version 6.0.3 (build 6.0.3.1.4) Checksums: sha1: ce83977790825d588d1f9306226283455c06aa6d Back to all xcode release list Xcode Release 16.1 (build 16B40) at 2024-10-28 Xcode Version: 16.1 (build 16B40) Release Date: 2024-10-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.1/Xcode_16.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_1-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.1 (build 22B74) macOS: Version 15.1 (build 24B75) tvOS: Version 18.1 (build 22J572) visionOS: Version 2.1 (build 22N573) watchOS: Version 11.1 (build 22R574) Compilers: clang: Version 16.0.0 (build 1600.0.26.4) swift: Version 6.0.2 (build 6.0.2.1.2) Checksums: sha1: 826ec65f2a9a257fcd6c159a9112d8c7ca281759 Back to all xcode release list Xcode Release 16.2 (build 16B5100e) Beta at 2024-10-23 Xcode Version: 16.2 (build 16B5100e) Beta Release Date: 2024-10-23 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.2_beta_1/Xcode_16.2_beta_1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.2 (build 22C5109l) macOS: Version 15.2 (build 24C5057l) tvOS: Version 18.1 (build 22J572) visionOS: Version 2.1 (build 22N573) watchOS: Version 11.1 (build 22R574) Compilers: clang: Version 16.0.0 (build 1600.0.26.4) swift: Version 6.0.2 (build 6.0.2.1.2) Checksums: sha1: 376e1ea03d7b8e853700c6e365e8bb9375a48e6e Back to all xcode release list Xcode Release 16.1 (build 16B40) at 2024-10-21 Xcode Version: 16.1 (build 16B40) Release Date: 2024-10-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.1_Release_Candidate/Xcode_16.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_1-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.1 (build 22B74) macOS: Version 15.1 (build 24B75) tvOS: Version 18.1 (build 22J572) visionOS: Version 2.1 (build 22N573) watchOS: Version 11.1 (build 22R574) Compilers: clang: Version 16.0.0 (build 1600.0.26.4) swift: Version 6.0.2 (build 6.0.2.1.2) Checksums: sha1: 826ec65f2a9a257fcd6c159a9112d8c7ca281759 Back to all xcode release list Xcode Release 16.1 (build 16B5029d) Beta at 2024-10-7 Xcode Version: 16.1 (build 16B5029d) Beta Release Date: 2024-10-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.1_beta_3/Xcode_16.1_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_1-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.1 (build 22B5067a) macOS: Version 15.1 (build 24B5068a) tvOS: Version 18.1 (build 22J5565a) visionOS: Version 2.1 (build 22N5566a) watchOS: Version 11.1 (build 22R5567a) Compilers: clang: Version 16.0.0 (build 1600.0.26.4) swift: Version 6.0.2 (build 6.0.2.1.2) Checksums: sha1: fda91c7f4e60717da6c151b7fe5c535fb46bca86 Back to all xcode release list Xcode Release 16.1 (build 16B5014f) Beta at 2024-9-17 Xcode Version: 16.1 (build 16B5014f) Beta Release Date: 2024-9-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.1_beta_2/Xcode_16.1_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_1-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.1 (build 22B5045f) macOS: Version 15.1 (build 24B5046f) tvOS: Version 18.1 (build 22J5543e) visionOS: Version 2.1 (build 22N5548c) watchOS: Version 11.1 (build 22R5545f) Compilers: clang: Version 16.0.0 (build 1600.0.26.3) swift: Version 6.0 (build 6.0.0.9.11) Checksums: sha1: b2bb6e8415277b18f162e50405b91a98e4d75f50 Back to all xcode release list Xcode Release 16.0 (build 16A242d) at 2024-9-16 Xcode Version: 16.0 (build 16A242d) Release Date: 2024-9-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16/Xcode_16.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A3362) macOS: Version 15.0 (build 24A336) tvOS: Version 18.0 (build 22J358) visionOS: Version 2.0 (build 22N331) watchOS: Version 11.0 (build 22R350) Compilers: clang: Version 16.0.0 (build 1600.0.26.3) swift: Version 6.0 (build 6.0.0.9.10) Checksums: sha1: 71b15ff10826474491ebca3d36a6ca5964b9e1c5 Back to all xcode release list Xcode Release 16.0 (build 16A242) at 2024-9-9 Xcode Version: 16.0 (build 16A242) Release Date: 2024-9-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16_Release_Candidate/Xcode_16_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A348) macOS: Version 15.0 (build 24A330) tvOS: Version 18.0 (build 22J355) visionOS: Version 2.0 (build 22N316) watchOS: Version 11.0 (build 22R349) Compilers: clang: Version 16.0.0 (build 1600.0.26.3) swift: Version 6.0 (build 6.0.0.9.10) Checksums: sha1: a59e42a7350dda9365c9c659ad94e08a6381363f Back to all xcode release list Xcode Release 16.0 (build 16A5230g) Beta at 2024-8-20 Xcode Version: 16.0 (build 16A5230g) Beta Release Date: 2024-8-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16_beta_6/Xcode_16_beta_6.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A5342a) macOS: Version 15.0 (build 24A5324a) tvOS: Version 18.0 (build 22J5350a) visionOS: Version 2.0 (build 22N5312a) watchOS: Version 11.0 (build 22R5344a) Compilers: clang: Version 16.0.0 (build 1600.0.26.3) swift: Version 6.0 (build 6.0.0.9.10) Checksums: sha1: 6d6da87fbd36d9cf04883d4acf6ae252dfa357df Back to all xcode release list Xcode Release 16.1 (build 16B5001e) Beta at 2024-8-12 Xcode Version: 16.1 (build 16B5001e) Beta Release Date: 2024-8-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16.1_beta/Xcode_16.1_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_1-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.1 (build 22B5023b) macOS: Version 15.1 (build 24B5024b) tvOS: Version 18.0 (build 22J5335e) visionOS: Version 2.0 (build 22N5297d) watchOS: Version 11.0 (build 22R5328f) Compilers: clang: Version 16.0.0 (build 1600.0.24.1) swift: Version 6.0 (build 6.0.0.7.6) Checksums: sha1: 0ecc3cc5640ee37036422a89497e41544aecf320 Back to all xcode release list Xcode Release 16.0 (build 16A5221g) Beta at 2024-8-6 Xcode Version: 16.0 (build 16A5221g) Beta Release Date: 2024-8-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16_beta_5/Xcode_16_beta_5.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A5326g) macOS: Version 15.0 (build 24A5309c) tvOS: Version 18.0 (build 22J5335e) visionOS: Version 2.0 (build 22N5297d) watchOS: Version 11.0 (build 22R5328f) Compilers: clang: Version 16.0.0 (build 1600.0.24.1) swift: Version 6.0 (build 6.0.0.7.6) Checksums: sha1: fc57b98bde42196a1af1f9452419a9d848d4fdb1 Back to all xcode release list Xcode Release 16.0 (build 16A5211f) Beta at 2024-7-23 Xcode Version: 16.0 (build 16A5211f) Beta Release Date: 2024-7-23 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16_beta_4/Xcode_16_beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A5316f) macOS: Version 15.0 (build 24A5298f) tvOS: Version 18.0 (build 22J5324f) visionOS: Version 2.0 (build 22N5286f) watchOS: Version 11.0 (build 22R5318f) Compilers: clang: Version 16.0.0 (build 1600.0.23.1) swift: Version 6.0 (build 6.0.0.6.8) Checksums: sha1: 4de78bdf473ecaf42e358e91c3886c2768cf338b Back to all xcode release list Xcode Release 16.0 (build 16A5202i) Beta at 2024-7-8 Xcode Version: 16.0 (build 16A5202i) Beta Release Date: 2024-7-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16_beta_3/Xcode_16_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A5307d) macOS: Version 15.0 (build 24A5289c) tvOS: Version 18.0 (build 22J5315c) visionOS: Version 2.0 (build 22N5277d) watchOS: Version 11.0 (build 22R5309d) Compilers: clang: Version 16.0.0 (build 1600.0.22.7) swift: Version 6.0 (build 6.0.0.5.15) Checksums: sha1: d79bd4475e17a0db2fb59861f1220de3f6518baa Back to all xcode release list Xcode Release 16.0 (build 16A5171r) Beta at 2024-6-25 Xcode Version: 16.0 (build 16A5171r) Beta Release Date: 2024-6-25 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16_beta_2/Xcode_16_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A5297f) macOS: Version 15.0 (build 24A5279g) tvOS: Version 18.0 (build 22J5305d) visionOS: Version 2.0 (build 22N5267d) watchOS: Version 11.0 (build 22R5299c) Compilers: clang: Version 16.0.0 (build 1600.0.21.4) swift: Version 6.0 (build 6.0.0.4.52) Checksums: sha1: 35acecd39dd330039110b96b40c5e60ec70db4c2 Back to all xcode release list Xcode Release 16.0 (build 16A5171c) Beta at 2024-6-10 Xcode Version: 16.0 (build 16A5171c) Beta Release Date: 2024-6-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_16_beta/Xcode_16_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes Requires: Mac OSX 14.5 SDKS: iOS: Version 18.0 (build 22A5282g) macOS: Version 15.0 (build 24A5264i) tvOS: Version 18.0 (build 22J5290f) visionOS: Version 2.0 (build 22N5252g) watchOS: Version 11.0 (build 22R5284g) Compilers: clang: Version 16.0.0 (build 1600.0.20.10) swift: Version 6.0 (build 6.0.0.3.300) Checksums: sha1: 5be49fe777439f9935ec7c131116bd4854ee3017 Back to all xcode release list Xcode Release 15.4 (build 15F31d) at 2024-5-13 Xcode Version: 15.4 (build 15F31d) Release Date: 2024-5-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.4/Xcode_15.4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_4-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.5 (build 21F77) macOS: Version 14.5 (build 23F73) tvOS: Version 17.5 (build 21L566) visionOS: Version 1.2 (build 21O5565d) watchOS: Version 10.5 (build 21T569) Compilers: clang: Version 15.0.0 (build 1500.3.9.4) swift: Version 5.10 (build 5.10.0.13) Checksums: sha1: 0e841786aaaff88feedf648f2b8b273616c39fdb Back to all xcode release list Xcode Release 15.4 (build 15F31c) at 2024-5-7 Xcode Version: 15.4 (build 15F31c) Release Date: 2024-5-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.4_Release_Candidate/Xcode_15.4_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_4-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.5 (build 21F77) macOS: Version 14.5 (build 23F73) tvOS: Version 17.5 (build 21L566) visionOS: Version 1.2 (build 21O5565d) watchOS: Version 10.5 (build 21T569) Compilers: clang: Version 15.0.0 (build 1500.3.9.4) swift: Version 5.10 (build 5.10.0.13) Checksums: sha1: 5c2a760dec99c7170e1f86e6b05bf3c073bad276 Back to all xcode release list Xcode Release 15.4 (build 15F5021i) Beta at 2024-4-16 Xcode Version: 15.4 (build 15F5021i) Beta Release Date: 2024-4-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.4_beta/Xcode_15.4_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_4-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.5 (build 21F5058d) macOS: Version 14.5 (build 23F5059d) tvOS: Version 17.5 (build 21L5553d) visionOS: Version 1.2 (build 21O5565d) watchOS: Version 10.5 (build 21T5555c) Compilers: clang: Version 15.0.0 (build 1500.3.9.4) swift: Version 5.10 (build 5.10.0.13) Checksums: sha1: cbde3cae8a8ef10e99b2c75f64dda42a5085b7e4 Back to all xcode release list Xcode Release 15.3 (build 15E204a) at 2024-3-5 Xcode Version: 15.3 (build 15E204a) Release Date: 2024-3-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.3/Xcode_15.3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.4 (build 21E210) macOS: Version 14.4 (build 23E208) tvOS: Version 17.4 (build 21L224) visionOS: Version 1.1 (build 21O200) watchOS: Version 10.4 (build 21T214) Compilers: clang: Version 15.0.0 (build 1500.3.9.4) swift: Version 5.10 (build 5.10.0.13) Checksums: sha1: f5fc8f91c15ae9d64dcce913a9f012282b062c2c Back to all xcode release list Xcode Release 15.3 (build 15E204a) at 2024-3-4 Xcode Version: 15.3 (build 15E204a) Release Date: 2024-3-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.3_Release_Candidate_2/Xcode_15.3_Release_Candidate_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.4 (build 21E210) macOS: Version 14.4 (build 23E208) tvOS: Version 17.4 (build 21L224) visionOS: Version 1.1 (build 21O200) watchOS: Version 10.4 (build 21T214) Compilers: clang: Version 15.0.0 (build 1500.3.9.4) swift: Version 5.10 (build 5.10.0.13) Checksums: sha1: f5fc8f91c15ae9d64dcce913a9f012282b062c2c Back to all xcode release list Xcode Release 15.3 (build 15E5202a) at 2024-2-27 Xcode Version: 15.3 (build 15E5202a) Release Date: 2024-2-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.3_Release_Candidate/Xcode_15.3_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.4 (build 21E212) macOS: Version 14.4 (build 23E5196c) tvOS: Version 17.4 (build 21L5212c) visionOS: Version 1.1 (build 21O5188b) watchOS: Version 10.4 (build 21T5202c) Compilers: clang: Version 15.0.0 (build 1500.3.9.4) swift: Version 5.10 (build 5.10.0.13) Checksums: sha1: cb1dbf26cf046d401af3b151f393459b66b9a4a2 Back to all xcode release list Xcode Release 15.3 (build 15E5194e) Beta at 2024-2-13 Xcode Version: 15.3 (build 15E5194e) Beta Release Date: 2024-2-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.3_beta_3/Xcode_15.3_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.4 (build 21E5200b) macOS: Version 14.4 (build 23E5196c) tvOS: Version 17.4 (build 21L5212c) visionOS: Version 1.1 (build 21O5188b) watchOS: Version 10.4 (build 21T5202c) Compilers: clang: Version 15.0.0 (build 1500.3.9.4) swift: Version 5.10 (build 5.10.0.13) Checksums: sha1: facfba2cd84292b748abae4196509fc38dbf1144 Back to all xcode release list Xcode Release 15.3 (build 15E5188j) Beta at 2024-2-6 Xcode Version: 15.3 (build 15E5188j) Beta Release Date: 2024-2-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.3_beta_2/Xcode_15.3_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.4 (build 21E5195d) macOS: Version 14.4 (build 23E5191c) tvOS: Version 17.4 (build 21L5206e) visionOS: Version 1.1 (build 21O5181e) watchOS: Version 10.4 (build 21T5196c) Compilers: clang: Version 15.0.0 (build 1500.3.9.3) swift: Version 5.10 (build 5.10.0.12.7) Checksums: sha1: 3de2de44b6dff33022a8bc2c5abba0c2fdddc3f4 Back to all xcode release list Xcode Release 15.3 (build 15E5178i) Beta at 2024-1-25 Xcode Version: 15.3 (build 15E5178i) Beta Release Date: 2024-1-25 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.3_beta/Xcode_15.3_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes Requires: Mac OSX 14.0 SDKS: iOS: Version 17.4 (build 21E5184g) macOS: Version 14.4 (build 23E5180g) tvOS: Version 17.4 (build 21L5195f) visionOS: Version 1.0 (build 21N301) watchOS: Version 10.4 (build 21T5185f) Compilers: clang: Version 15.0.0 (build 1500.3.7.5) swift: Version 5.10 (build 5.10.0.10.5) Checksums: sha1: b842a4de915788844d4291e12b5f2d390abc50b4 Back to all xcode release list Xcode Release 15.2 (build 15C500b) at 2024-1-8 Xcode Version: 15.2 (build 15C500b) Release Date: 2024-1-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.2/Xcode_15.2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_2-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.2 (build 21C52) macOS: Version 14.2 (build 23C53) tvOS: Version 17.2 (build 21K354) visionOS: Version 1.0 (build 21N301) watchOS: Version 10.2 (build 21S355) Compilers: clang: Version 15.0.0 (build 1500.1.0.2.5) swift: Version 5.9.2 (build 5.9.2.2.56) Checksums: sha1: 3f1e6943264ba640f83e655768df439902acc406 Back to all xcode release list Xcode Release 15.2 (build 15C5500c) Beta at 2023-12-12 Xcode Version: 15.2 (build 15C5500c) Beta Release Date: 2023-12-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.2_beta/Xcode_15.2_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_2-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.2 (build 21C52) macOS: Version 14.2 (build 23C53) tvOS: Version 17.2 (build 21K354) visionOS: Version 1.0 (build 21N301) watchOS: Version 10.2 (build 21S355) Compilers: clang: Version 15.0.0 (build 1500.1.0.2.5) swift: Version 5.9.2 (build 5.9.2.2.56) Checksums: sha1: b6e2a7058c0464ecf0b3f4f286b5b5ea2dfbaa8d Back to all xcode release list Xcode Release 15.1 (build 15C65) at 2023-12-11 Xcode Version: 15.1 (build 15C65) Release Date: 2023-12-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.1/Xcode_15.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.2 (build 21C52) macOS: Version 14.2 (build 23C53) tvOS: Version 17.2 (build 21K354) watchOS: Version 10.2 (build 21S355) Compilers: clang: Version 15.0.0 (build 1500.1.0.2.5) swift: Version 5.9.2 (build 5.9.2.2.56) Checksums: sha1: 95f282337ae6a88bff970994100d00d10470df70 Back to all xcode release list Xcode Release 15.1 (build 15C65) at 2023-12-5 Xcode Version: 15.1 (build 15C65) Release Date: 2023-12-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.1_Release_Candidate/Xcode_15.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.2 (build 21C52) macOS: Version 14.2 (build 23C53) tvOS: Version 17.2 (build 21K354) watchOS: Version 10.2 (build 21S355) Compilers: clang: Version 15.0.0 (build 1500.1.0.2.5) swift: Version 5.9.2 (build 5.9.2.2.56) Checksums: sha1: 95f282337ae6a88bff970994100d00d10470df70 Back to all xcode release list Xcode Release 15.1 (build 15C5059c) Beta at 2023-11-14 Xcode Version: 15.1 (build 15C5059c) Beta Release Date: 2023-11-14 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.1_beta_3/Xcode_15.1_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.2 (build 21C5046b) macOS: Version 14.2 (build 23C5047d) tvOS: Version 17.2 (build 21K5348e) visionOS: Version 1.0 (build 21N5295a) watchOS: Version 10.2 (build 21S5349d) Compilers: clang: Version 15.0.0 (build 1500.1.0.2.5) swift: Version 5.9.2 (build 5.9.2.2.56) Checksums: sha1: 985a2d5b37af45a7775d723bd10730b0a7359d00 Back to all xcode release list Xcode Release 15.1 (build 15C5042i) Beta at 2023-10-26 Xcode Version: 15.1 (build 15C5042i) Beta Release Date: 2023-10-26 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.1_beta_2/Xcode_15.1_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.2 (build 21C5029d) macOS: Version 14.2 (build 23C5030d) tvOS: Version 17.2 (build 21K5330d) visionOS: Version 1.0 (build 21N5259i) watchOS: Version 10.2 (build 21S5331d) Compilers: clang: Version 15.0.0 (build 1500.1.0.2.4) swift: Version 5.9.2 (build 5.9.2.2.51) Checksums: sha1: bebb5affa9fb4a168c83dd8719e88f8f78eb8267 Back to all xcode release list Xcode Release 15.0.1 (build 15A507) at 2023-10-18 Xcode Version: 15.0.1 (build 15A507) Release Date: 2023-10-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.0.1/Xcode_15.0.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_0_1-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.0 (build 21A326) macOS: Version 14.0 (build 23A334) tvOS: Version 17.0 (build 21J351) watchOS: Version 10.0 (build 21R354) Compilers: clang: Version 15.0.0 (build 1500.0.40.1) swift: Version 5.9 (build 5.9.0.128.108) Checksums: sha1: ca99e27c55514de87965e33849dd7d9b910d61b1 Back to all xcode release list Xcode Release 15.0.1 (build 15A507) at 2023-10-11 Xcode Version: 15.0.1 (build 15A507) Release Date: 2023-10-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.0.1_Release_Candidate/Xcode_15.0.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_0_1-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.0 (build 21A326) macOS: Version 14.0 (build 23A334) tvOS: Version 17.0 (build 21J351) watchOS: Version 10.0 (build 21R354) Compilers: clang: Version 15.0.0 (build 1500.0.40.1) swift: Version 5.9 (build 5.9.0.128.108) Checksums: sha1: ca99e27c55514de87965e33849dd7d9b910d61b1 Back to all xcode release list Xcode Release 15.1 (build 15C5028h) Beta at 2023-10-3 Xcode Version: 15.1 (build 15C5028h) Beta Release Date: 2023-10-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15.1_beta/Xcode_15.1_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.0 (build 21A326) macOS: Version 14.0 (build 23A334) tvOS: Version 17.0 (build 21J351) visionOS: Version 1.0 (build 21N5259i) watchOS: Version 10.0 (build 21R354) Compilers: clang: Version 15.0.0 (build 1500.1.0.1.1) swift: Version 5.9 (build 5.9.2.1.6) Checksums: sha1: 6d268fe956b27d1f296413de66fad85585bbe357 Back to all xcode release list Xcode Release 15.0 (build 15A240d) at 2023-9-18 Xcode Version: 15.0 (build 15A240d) Release Date: 2023-9-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15/Xcode_15.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.0 (build 21A325) macOS: Version 14.0 (build 23A334) tvOS: Version 17.0 (build 21J351) watchOS: Version 10.0 (build 21R354) Compilers: clang: Version 15.0.0 (build 1500.0.40.1) swift: Version 5.9 (build 5.9.0.128.108) Checksums: sha1: eb46cd5bc039d713729b2715734da308908334b1 Back to all xcode release list Xcode Release 15.0 (build 15A240d) at 2023-9-12 Xcode Version: 15.0 (build 15A240d) Release Date: 2023-9-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_Release_Candidate/Xcode_15_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.5 SDKS: iOS: Version 17.0 (build 21A325) macOS: Version 14.0 (build 23A334) tvOS: Version 17.0 (build 21J351) watchOS: Version 10.0 (build 21R354) Compilers: clang: Version 15.0.0 (build 1500.0.40.1) swift: Version 5.9 (build 5.9.0.128.108) Checksums: sha1: eb46cd5bc039d713729b2715734da308908334b1 Back to all xcode release list Xcode Release 15.0 (build 15A5229m) Beta at 2023-8-29 Xcode Version: 15.0 (build 15A5229m) Beta Release Date: 2023-8-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta_8/Xcode_15_beta_8.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.4 SDKS: iOS: Version 17.0 (build 21A5325a) macOS: Version 14.0 (build 23A5334a) tvOS: Version 17.0 (build 21J5351a) visionOS: Version 1.0 (build 21N5233e) watchOS: Version 10.0 (build 21R5354a) Compilers: clang: Version 15.0.0 (build 1500.0.40.1) swift: Version 5.9 (build 5.9.0.128.106) Checksums: sha1: c374ebd0848f75a7f22701b3fe2966a4a36aab90 Back to all xcode release list Xcode Release 15.0 (build 15A5229h) Beta at 2023-8-22 Xcode Version: 15.0 (build 15A5229h) Beta Release Date: 2023-8-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta_7/Xcode_15_beta_7.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.4 SDKS: iOS: Version 17.0 (build 21A5317a) macOS: Version 14.0 (build 23A5326c) tvOS: Version 17.0 (build 21J5345a) visionOS: Version 1.0 (build 21N5207h) watchOS: Version 10.0 (build 21R5346a) Compilers: clang: Version 15.0.0 (build 1500.0.40.1) swift: Version 5.9 (build 5.9.0.128.106) Checksums: sha1: ebb5e5197742be03ae0a0da06dde6779a9d6de45 Back to all xcode release list Xcode Release 15.0 (build 15A5219j) Beta at 2023-8-8 Xcode Version: 15.0 (build 15A5219j) Beta Release Date: 2023-8-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta_6/Xcode_15_beta_6.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.4 SDKS: iOS: Version 17.0 (build 21A5303c) macOS: Version 14.0 (build 23A5312c) tvOS: Version 17.0 (build 21J5330e) visionOS: Version 1.0 (build 21N5207h) watchOS: Version 10.0 (build 21R5332e) Compilers: clang: Version 15.0.0 (build 1500.0.40.1) swift: Version 5.9 (build 5.9.0.128.2) Checksums: sha1: f19855468fdba728e5a5b87e62a2b3ce99583226 Back to all xcode release list Xcode Release 15.0 (build 15A5209g) Beta at 2023-7-25 Xcode Version: 15.0 (build 15A5209g) Beta Release Date: 2023-7-25 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta_5/Xcode_15_beta_5.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.4 SDKS: iOS: Version 17.0 (build 21A5291f) macOS: Version 14.0 (build 23A5301f) tvOS: Version 17.0 (build 21J5318e) visionOS: Version 1.0 (build 21N5207e) watchOS: Version 10.0 (build 21R5320f) Compilers: clang: Version 15.0.0 (build 1500.0.38.1) swift: Version 5.9 (build 5.9.0.124.4) Checksums: sha1: 6ee6c925fc96ca62eb372d1f833c75cd95e8f2d3 Back to all xcode release list Xcode Release 15.0 (build 15A5195m) Beta at 2023-7-11 Xcode Version: 15.0 (build 15A5195m) Beta Release Date: 2023-7-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta_4/Xcode_15_beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.4 SDKS: iOS: Version 17.0 (build 21A5277g) macOS: Version 14.0 (build 23A5286f) tvOS: Version 17.0 (build 21J5303f) visionOS: Version 1.0 (build 21N5165f) watchOS: Version 10.0 (build 21R5305e) Compilers: clang: Version 15.0.0 (build 1500.0.34.3) swift: Version 5.9 (build 5.9.0.120.7) Checksums: sha1: 5da0a1e6ad538e78a59de38a41e6dbab05a3ac1f Back to all xcode release list Xcode Release 15.0 (build 15A5195k) Beta at 2023-7-5 Xcode Version: 15.0 (build 15A5195k) Beta Release Date: 2023-7-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta_3/Xcode_15_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.4 SDKS: iOS: Version 17.0 (build 21A5277g) macOS: Version 14.0 (build 23A5286f) tvOS: Version 17.0 (build 21J5303f) visionOS: Version 1.0 (build 21N5165f) watchOS: Version 10.0 (build 21R5305e) Compilers: clang: Version 15.0.0 (build 1500.0.34.3) swift: Version 5.9 (build 5.9.0.120.7) Checksums: sha1: 0ce6f0d26fd2b982b0dc62c218416c769a70d4f8 Back to all xcode release list Xcode Release 15.0 (build 15A5161b) Beta at 2023-6-21 Xcode Version: 15.0 (build 15A5161b) Beta Release Date: 2023-6-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta_2/Xcode_15_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.4 SDKS: iOS: Version 17.0 (build 21A5268f) macOS: Version 14.0 (build 23A5276e) tvOS: Version 17.0 (build 21J5293e) visionOS: Version 1.0 (build 21N5165f) watchOS: Version 10.0 (build 21R5295e) Compilers: clang: Version 15.0.0 (build 1500.0.29.1) swift: Version 5.9 (build 5.9.0.114.10) Checksums: sha1: eb041f673cc57a192f27fa92b44314c72456877d Back to all xcode release list Xcode Release 15.0 (build 15A5160n) Beta at 2023-6-5 Xcode Version: 15.0 (build 15A5160n) Beta Release Date: 2023-6-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_15_beta/Xcode_15_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Requires: Mac OSX 13.3 SDKS: iOS: Version 17.0 (build 21A5248u) macOS: Version 14.0 (build 23A5257p) tvOS: Version 17.0 (build 21J5273p) watchOS: Version 10.0 (build 21R5275s) Compilers: clang: Version 15.0.0 (build 1500.0.28.1.1) swift: Version 5.9 (build 5.9.0.114.6) Checksums: sha1: 681573706f7c4bc24eecb5d9c3fd3230d053e225 Back to all xcode release list Xcode Release 14.3.1 (build 14E300c) at 2023-6-1 Xcode Version: 14.3.1 (build 14E300c) Release Date: 2023-6-1 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3.1/Xcode_14.3.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3_1-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E238) macOS: Version 13.3 (build 22E245) tvOS: Version 16.4 (build 20L489) watchOS: Version 9.4 (build 20T248) Compilers: clang: Version 14.0.3 (build 1403.0.22.14.1) swift: Version 5.8.1 (build 5.8.0.124.5) Checksums: sha1: 7691e680f662c7f8a6c5333076ad2730465fb401 Back to all xcode release list Xcode Release 14.3.1 (build 14E300b) at 2023-5-17 Xcode Version: 14.3.1 (build 14E300b) Release Date: 2023-5-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3.1_Release_Candidate/Xcode_14.3.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3_1-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E238) macOS: Version 13.3 (build 22E245) tvOS: Version 16.4 (build 20L489) watchOS: Version 9.4 (build 20T248) Compilers: clang: Version 14.0.3 (build 1403.0.22.14.1) swift: Version 5.8.1 (build 5.8.0.124.5) Checksums: sha1: abdd3d08747f526e577ef06a2cb9128a1656f6f6 Back to all xcode release list Xcode Release 14.3 (build 14E222b) at 2023-3-30 Xcode Version: 14.3 (build 14E222b) Release Date: 2023-3-30 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3/Xcode_14.3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E238) macOS: Version 13.3 (build 22E245) tvOS: Version 16.4 (build 20L489) watchOS: Version 9.4 (build 20T248) Compilers: clang: Version 14.0.3 (build 1403.0.22.14.1) swift: Version 5.8 (build 5.8.0.124.2) Checksums: sha1: 886889003daa32b8353ef54eb258e68437bc2623 Back to all xcode release list Xcode Release 14.3 (build 14E222b) at 2023-3-27 Xcode Version: 14.3 (build 14E222b) Release Date: 2023-3-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3_Release_Candidate_2/Xcode_14.3_Release_Candidate_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E238) macOS: Version 13.3 (build 22E245) tvOS: Version 16.4 (build 20L489) watchOS: Version 9.4 (build 20T248) Compilers: clang: Version 14.0.3 (build 1403.0.22.14.1) swift: Version 5.8 (build 5.8.0.124.2) Checksums: sha1: 886889003daa32b8353ef54eb258e68437bc2623 Back to all xcode release list Xcode Release 14.3 (build 14E222a) at 2023-3-21 Xcode Version: 14.3 (build 14E222a) Release Date: 2023-3-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3_Release_Candidate/Xcode_14.3_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E238) macOS: Version 13.3 (build 22E245) tvOS: Version 16.4 (build 20L489) watchOS: Version 9.4 (build 20T248) Compilers: clang: Version 14.0.3 (build 1403.0.22.14.1) swift: Version 5.8 (build 5.8.0.124.1) Checksums: sha1: 392ca30c6a431963460708e404fb22b7da937050 Back to all xcode release list Xcode Release 14.3 (build 14E5215g) Beta at 2023-3-15 Xcode Version: 14.3 (build 14E5215g) Beta Release Date: 2023-3-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3_beta_3/Xcode_14.3_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E5238a) macOS: Version 13.3 (build 22E5245a) tvOS: Version 16.4 (build 20L5489a) watchOS: Version 9.4 (build 20T5248a) Compilers: clang: Version 14.0.3 (build 1403.0.22.14.1) swift: Version 5.8 (build 5.8.0.124.1) Checksums: sha1: 474af240a5fc80498d120a454d63b20f850324a5 Back to all xcode release list Xcode Release 14.3 (build 14E5207e) Beta at 2023-2-28 Xcode Version: 14.3 (build 14E5207e) Beta Release Date: 2023-2-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3_beta_2/Xcode_14.3_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E5223f) macOS: Version 13.3 (build 22E5230e) tvOS: Version 16.4 (build 20L5474e) watchOS: Version 9.4 (build 20T5233d) Compilers: clang: Version 14.0.3 (build 1403.0.22.12) swift: Version 5.8 (build 5.8.0.119.11) Checksums: sha1: cac756bb181e142572fcd5588e97c2b76999145e Back to all xcode release list Xcode Release 14.3 (build 14E5197f) Beta at 2023-2-16 Xcode Version: 14.3 (build 14E5197f) Beta Release Date: 2023-2-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.3_beta/Xcode_14.3_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes Requires: Mac OSX 13.0 SDKS: iOS: Version 16.4 (build 20E5212f) macOS: Version 13.3 (build 22E5219e) tvOS: Version 16.4 (build 20L5463g) watchOS: Version 9.4 (build 20T5222f) Compilers: clang: Version 14.0.3 (build 1403.0.22.11) swift: Version 5.8 (build 5.8.0.117.11) Checksums: sha1: db035b8e5e9f15bce45dc2a8eec14a9165b5e15b Back to all xcode release list Xcode Release 14.2 (build 14C18) at 2022-12-13 Xcode Version: 14.2 (build 14C18) Release Date: 2022-12-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.2/Xcode_14.2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_2-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.2 (build 20C52) macOS: Version 13.1 (build 22C55) tvOS: Version 16.1 (build 20K67) watchOS: Version 9.1 (build 20S71) Compilers: clang: Version 14.0.0 (build 1400.0.29.202) swift: Version 5.7.2 (build 5.7.2.135.5) Checksums: sha1: 6ca65c91a92e74e7419371d94177159c6477e086 Back to all xcode release list Xcode Release 14.2 (build 14C18) at 2022-12-7 Xcode Version: 14.2 (build 14C18) Release Date: 2022-12-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.2_Release_Candidate/Xcode_14.2_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_2-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.2 (build 20C52) macOS: Version 13.1 (build 22C55) tvOS: Version 16.1 (build 20K67) watchOS: Version 9.1 (build 20S71) Compilers: clang: Version 14.0.0 (build 1400.0.29.202) swift: Version 5.7.2 (build 5.7.2.135.5) Checksums: sha1: 6ca65c91a92e74e7419371d94177159c6477e086 Back to all xcode release list Xcode Release 14.1 (build 14B47b) at 2022-11-1 Xcode Version: 14.1 (build 14B47b) Release Date: 2022-11-1 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.1/Xcode_14.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.1 (build 20B71) macOS: Version 13.0 (build 22A372) tvOS: Version 16.1 (build 20K67) watchOS: Version 9.1 (build 20S71) Compilers: clang: Version 14.0.0 (build 1400.0.29.202) swift: Version 5.7.1 (build 5.7.1.135.3) Checksums: sha1: 06cbec1c0adcbc04b910d1a55892a09f0793a2a1 Back to all xcode release list Xcode Release 14.1 (build 14B47b) at 2022-10-24 Xcode Version: 14.1 (build 14B47b) Release Date: 2022-10-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.1_Release_Candidate_2/Xcode_14.1_Release_Candidate_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.1 (build 20B71) macOS: Version 13.0 (build 22A372) tvOS: Version 16.1 (build 20K67) watchOS: Version 9.1 (build 20S71) Compilers: clang: Version 14.0.0 (build 1400.0.29.202) swift: Version 5.7.1 (build 5.7.1.135.3) Checksums: sha1: 06cbec1c0adcbc04b910d1a55892a09f0793a2a1 Back to all xcode release list Xcode Release 14.1 (build 14B47) at 2022-10-18 Xcode Version: 14.1 (build 14B47) Release Date: 2022-10-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.1_Release_Candidate/Xcode_14.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.1 (build 20B71) macOS: Version 13.0 (build 22A372) tvOS: Version 16.1 (build 20K67) watchOS: Version 9.1 (build 20S71) Compilers: clang: Version 14.0.0 (build 1400.0.29.202) swift: Version 5.7.1 (build 5.7.1.135.2) Checksums: sha1: 89cbb2194cec40be05bd0544dc4412d9d3e14423 Back to all xcode release list Xcode Release 14.1 (build 14B5033e) Beta at 2022-9-27 Xcode Version: 14.1 (build 14B5033e) Beta Release Date: 2022-9-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.1_beta_3/Xcode_14.1_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.1 (build 20B5056e) macOS: Version 13.0 (build 22A5358d) tvOS: Version 16.1 (build 20K5052c) watchOS: Version 9.1 (build 20S5055d) Compilers: clang: Version 14.0.0 (build 1400.0.29.201) swift: Version 5.7.1 (build 5.7.1.134.3) Checksums: sha1: 601a051a503c2c7a25265e311384d6342164a0a2 Back to all xcode release list Xcode Release 14.0.1 (build 14A400) at 2022-9-26 Xcode Version: 14.0.1 (build 14A400) Release Date: 2022-9-26 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.0.1/Xcode_14.0.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_0_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.0 (build 20A360) macOS: Version 12.3 (build 21E226) tvOS: Version 16.0 (build 20J373) watchOS: Version 9.0 (build 20R362) Compilers: clang: Version 14.0.0 (build 1400.0.29.102) swift: Version 5.7 (build 5.7.0.127.4) Checksums: sha1: cf00e25cc7121dd880f2871e9c4260f56d84c2b4 Back to all xcode release list Xcode Release 14.1 (build 14B5024i) Beta at 2022-9-20 Xcode Version: 14.1 (build 14B5024i) Beta Release Date: 2022-9-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.1_beta_2/Xcode_14.1_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.1 (build 20B5045d) macOS: Version 13.0 (build 22A5342f) tvOS: Version 16.1 (build 20K5041d) watchOS: Version 9.1 (build 20S5044e) Compilers: clang: Version 14.0.0 (build 1400.0.29.201) swift: Version 5.7.1 (build 5.7.1.131.4) Checksums: sha1: dc9de02f90dd926a6db9b0b104b3a166acb6ff9b Back to all xcode release list Xcode Release 14.0.1 (build 14A400) at 2022-9-16 Xcode Version: 14.0.1 (build 14A400) Release Date: 2022-9-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.0.1_Release_Candidate/Xcode_14.0.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_0_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.0 (build 20A360) macOS: Version 12.3 (build 21E226) tvOS: Version 16.0 (build 20J373) watchOS: Version 9.0 (build 20R362) Compilers: clang: Version 14.0.0 (build 1400.0.29.102) swift: Version 5.7 (build 5.7.0.127.4) Checksums: sha1: cf00e25cc7121dd880f2871e9c4260f56d84c2b4 Back to all xcode release list Xcode Release 14.1 (build 14B5024h) Beta at 2022-9-14 Xcode Version: 14.1 (build 14B5024h) Beta Release Date: 2022-9-14 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14.1_beta/Xcode_14.1_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.1 (build 20B5045d) macOS: Version 13.0 (build 22A5342f) tvOS: Version 16.1 (build 20K5041d) watchOS: Version 9.1 (build 20S5044e) Compilers: clang: Version 14.0.0 (build 1400.0.29.201) swift: Version 5.7.1 (build 5.7.1.131.4) Checksums: sha1: 34e1068547f4320d6cb99b90d682d36a916d7781 Back to all xcode release list Xcode Release 14.0 (build 14A309) at 2022-9-12 Xcode Version: 14.0 (build 14A309) Release Date: 2022-9-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14/Xcode_14.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.0 (build 20A360) macOS: Version 12.3 (build 21E226) tvOS: Version 16.0 (build 20J373) watchOS: Version 9.0 (build 20R362) Compilers: clang: Version 14.0.0 (build 1400.0.29.102) swift: Version 5.7 (build 5.7.0.127.4) Checksums: sha1: 2bcadb56531d66d6bead152009c7f1cfda47d080 Back to all xcode release list Xcode Release 14.0 (build 14A309) at 2022-9-7 Xcode Version: 14.0 (build 14A309) Release Date: 2022-9-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14_Release_Candidate/Xcode_14_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.5 SDKS: iOS: Version 16.0 (build 20A360) macOS: Version 12.3 (build 21E226) tvOS: Version 16.0 (build 20J373) watchOS: Version 9.0 (build 20R362) Compilers: clang: Version 14.0.0 (build 1400.0.29.102) swift: Version 5.7 (build 5.7.0.127.4) Checksums: sha1: 2bcadb56531d66d6bead152009c7f1cfda47d080 Back to all xcode release list Xcode Release 14.0 (build 14A5294g) Beta at 2022-8-23 Xcode Version: 14.0 (build 14A5294g) Beta Release Date: 2022-8-23 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14_beta_6/Xcode_14_beta_6.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.4 SDKS: iOS: Version 16.0 (build 20A5339d) macOS: Version 13.0 (build 22A5321d) tvOS: Version 16.0 (build 20J5355f) watchOS: Version 9.0 (build 20R5343e) Compilers: clang: Version 14.0.0 (build 1400.0.29.102) swift: Version 5.7 (build 5.7.0.123.8) Checksums: sha1: b43afcb18846c0b91ee663c18446aad5757916b6 Back to all xcode release list Xcode Release 14.0 (build 14A5294e) Beta at 2022-8-8 Xcode Version: 14.0 (build 14A5294e) Beta Release Date: 2022-8-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14_beta_5/Xcode_14_beta_5.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.4 SDKS: iOS: Version 16.0 (build 20A5339d) macOS: Version 13.0 (build 22A5321d) tvOS: Version 16.0 (build 20J5355f) watchOS: Version 9.0 (build 20R5343e) Compilers: clang: Version 14.0.0 (build 1400.0.29.102) swift: Version 5.7 (build 5.7.0.123.8) Checksums: sha1: dbdd135f8cc8b9af1080dcbed3eddccc073f9e34 Back to all xcode release list Xcode Release 14.0 (build 14A5284g) Beta at 2022-7-27 Xcode Version: 14.0 (build 14A5284g) Beta Release Date: 2022-7-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14_beta_4/Xcode_14_beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.4 SDKS: iOS: Version 16.0 (build 20A5328h) macOS: Version 13.0 (build 22A5311f) tvOS: Version 16.0 (build 20J5344e) watchOS: Version 9.0 (build 20R5332f) Compilers: clang: Version 14.0.0 (build 1400.0.29.100) swift: Version 5.7 (build 5.7.0.123.7) Checksums: sha1: 0f86c42dfd73fab007b487884c884adf0403039e Back to all xcode release list Xcode Release 14.0 (build 14A5270f) Beta at 2022-7-6 Xcode Version: 14.0 (build 14A5270f) Beta Release Date: 2022-7-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14_beta_3/Xcode_14_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.4 SDKS: iOS: Version 16.0 (build 20A5312e) macOS: Version 13.0 (build 22A5295f) tvOS: Version 16.0 (build 20J5328e) watchOS: Version 9.0 (build 20R5316e) Compilers: clang: Version 14.0.0 (build 1400.0.28.1) swift: Version 5.7 (build 5.7.0.120.1) Checksums: sha1: 362056ce1af2d64da154fd7d1f8b4633491147c6 Back to all xcode release list Xcode Release 14.0 (build 14A5229c) Beta at 2022-6-22 Xcode Version: 14.0 (build 14A5229c) Beta Release Date: 2022-6-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14_beta_2/Xcode_14_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.4 SDKS: iOS: Version 16.0 (build 20A5303f) macOS: Version 13.0 (build 22A5286g) tvOS: Version 16.0 (build 20J5319f) watchOS: Version 9.0 (build 20R5307f) Compilers: clang: Version 14.0.0 (build 1400.0.17.3.3) swift: Version 5.7 (build 5.7.0.113.202) Checksums: sha1: caa14e9e8f171aa6ab7ff65bdfb416a0d88a1ab3 Back to all xcode release list Xcode Release 14.0 (build 14A5228q) Beta at 2022-6-6 Xcode Version: 14.0 (build 14A5228q) Beta Release Date: 2022-6-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_14_beta/Xcode_14_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes Requires: Mac OSX 12.4 SDKS: iOS: Version 16.0 (build 20A5283m) macOS: Version 13.0 (build 22A5266o) tvOS: Version 16.0 (build 20J5299n) watchOS: Version 9.0 (build 20R5287p) Compilers: clang: Version 14.0.0 (build 1400.0.17.3.1) swift: Version 5.7 (build 5.7.0.113.202) Checksums: sha1: f3744a0026a801a7f35d23dabc0b01d6f51d7d14 Back to all xcode release list Xcode Release 13.4.1 (build 13F100) at 2022-6-2 Xcode Version: 13.4.1 (build 13F100) Release Date: 2022-6-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.4.1/Xcode_13.4.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_4_1-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.5 (build 19F64) macOS: Version 12.3 (build 21E226) tvOS: Version 15.4 (build 19L439) watchOS: Version 8.5 (build 19T241) Compilers: clang: Version 13.1.6 (build 1316.0.21.2.5) swift: Version 5.6.1 (build 5.6.0.323.66) Checksums: sha1: 40e8628555b6231b361471183f3ce17b378036fd Back to all xcode release list Xcode Release 13.4 (build 13F17a) at 2022-5-16 Xcode Version: 13.4 (build 13F17a) Release Date: 2022-5-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.4/Xcode_13.4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_4-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.5 (build 19F64) macOS: Version 12.3 (build 21E226) tvOS: Version 15.4 (build 19L439) watchOS: Version 8.5 (build 19T241) Compilers: clang: Version 13.1.6 (build 1316.0.21.2.5) swift: Version 5.6.1 (build 5.6.0.323.66) Checksums: sha1: d71192968cf948eaefeec25c4e05576c2f4d5217 Back to all xcode release list Xcode Release 13.4 (build 13F17a) at 2022-5-12 Xcode Version: 13.4 (build 13F17a) Release Date: 2022-5-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.4_Release_Candidate/Xcode_13.4_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_4-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.5 (build 19F64) macOS: Version 12.3 (build 21E226) tvOS: Version 15.4 (build 19L439) watchOS: Version 8.5 (build 19T241) Compilers: clang: Version 13.1.6 (build 1316.0.21.2.5) swift: Version 5.6.1 (build 5.6.0.323.66) Checksums: sha1: d71192968cf948eaefeec25c4e05576c2f4d5217 Back to all xcode release list Xcode Release 13.3.1 (build 13E500a) at 2022-4-11 Xcode Version: 13.3.1 (build 13E500a) Release Date: 2022-4-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.3.1/Xcode_13.3.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3_1-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.4 (build 19E239) macOS: Version 12.3 (build 21E226) tvOS: Version 15.4 (build 19L439) watchOS: Version 8.5 (build 19T241) Compilers: clang: Version 13.1.6 (build 1316.0.21.2.3) swift: Version 5.6 (build 5.6.0.323.62) Checksums: sha1: 0b01c5a2dd692cd6dbdd47d78bb2deb483b1d2f8 Back to all xcode release list Xcode Release 13.3 (build 13E113) at 2022-3-14 Xcode Version: 13.3 (build 13E113) Release Date: 2022-3-14 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.3/Xcode_13.3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.4 (build 19E239) macOS: Version 12.3 (build 21E226) tvOS: Version 15.4 (build 19L439) watchOS: Version 8.5 (build 19T241) Compilers: clang: Version 13.1.6 (build 1316.0.21.2) swift: Version 5.6 (build 5.6.0.323.62) Checksums: sha1: 4bb7ffed9abd20ab3e5376122341e0d0e4ea6a92 Back to all xcode release list Xcode Release 13.3 (build 13E113) at 2022-3-8 Xcode Version: 13.3 (build 13E113) Release Date: 2022-3-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.3_Release_Candidate/Xcode_13.3_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.4 (build 19E239) macOS: Version 12.3 (build 21E226) tvOS: Version 15.4 (build 19L439) watchOS: Version 8.5 (build 19T241) Compilers: clang: Version 13.1.6 (build 1316.0.21.2) swift: Version 5.6 (build 5.6.0.323.62) Checksums: sha1: 4bb7ffed9abd20ab3e5376122341e0d0e4ea6a92 Back to all xcode release list Xcode Release 13.3 (build 13E5104i) Beta at 2022-2-22 Xcode Version: 13.3 (build 13E5104i) Beta Release Date: 2022-2-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.3_beta_3/Xcode_13.3_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.4 (build 19E5234a) macOS: Version 12.3 (build 21E5221a) tvOS: Version 15.4 (build 19L5434a) watchOS: Version 8.5 (build 19T5237a) Compilers: clang: Version 13.1.6 (build 1316.0.21.1) swift: Version 5.6 (build 5.6.0.323.60) Checksums: sha1: b1f57105eff66113b4868fe09fe7fa2f7f8a294e Back to all xcode release list Xcode Release 13.3 (build 13E5095k) Beta at 2022-2-8 Xcode Version: 13.3 (build 13E5095k) Beta Release Date: 2022-2-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.3_beta_2/Xcode_13.3_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.4 (build 19E5219e) macOS: Version 12.3 (build 21E5206d) tvOS: Version 15.4 (build 19L5419e) watchOS: Version 8.5 (build 19T5223e) Compilers: clang: Version 13.1.6 (build 1316.0.20.6) swift: Version 5.6 (build 5.6.0.322.3) Checksums: sha1: 3a5dceae18e2c4727a2daf8865e3e56a351584c1 Back to all xcode release list Xcode Release 13.3 (build 13E5086k) Beta at 2022-1-27 Xcode Version: 13.3 (build 13E5086k) Beta Release Date: 2022-1-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.3_beta/Xcode_13.3_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Requires: Mac OSX 12.0 SDKS: iOS: Version 15.4 (build 19E5209h) macOS: Version 12.3 (build 21E5196i) tvOS: Version 15.4 (build 19L5409i) watchOS: Version 8.5 (build 19T5212h) Compilers: clang: Version 13.1.6 (build 1316.0.19.2) swift: Version 5.6 (build 5.6.0.320.8) Checksums: sha1: c4e1784135754cbdcb46f4e22d9bac46513887f7 Back to all xcode release list Xcode Release 13.2.1 (build 13C100) at 2021-12-17 Xcode Version: 13.2.1 (build 13C100) Release Date: 2021-12-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.2.1/Xcode_13.2.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2_1-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.2 (build 19C51) macOS: Version 12.1 (build 21C46) tvOS: Version 15.2 (build 19K50) watchOS: Version 8.3 (build 19S51) Compilers: clang: Version 13.0.0 (build 1300.0.29.30) swift: Version 5.5.2 (build 1300.0.47.5) Checksums: sha1: b26ec1bc789a076905904976549f5e1df1aebb40 Back to all xcode release list Xcode Release 13.2 (build 13C90) at 2021-12-13 Xcode Version: 13.2 (build 13C90) Release Date: 2021-12-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.2/Xcode_13.2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.2 (build 19C51) macOS: Version 12.1 (build 21C46) tvOS: Version 15.2 (build 19K50) watchOS: Version 8.3 (build 19S51) Compilers: clang: Version 13.0.0 (build 1300.0.29.30) swift: Version 5.5.2 (build 1300.0.47.5) Checksums: sha1: 1e6bffb5623a56d33982f101520cde0a093d9f85 Back to all xcode release list Xcode Release 13.2 (build 13C90) at 2021-12-7 Xcode Version: 13.2 (build 13C90) Release Date: 2021-12-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.2_Release_Candidate/Xcode_13.2_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.2 (build 19C51) macOS: Version 12.1 (build 21C46) tvOS: Version 15.2 (build 19K50) watchOS: Version 8.3 (build 19S51) Compilers: clang: Version 13.0.0 (build 1300.0.29.30) swift: Version 5.5.2 (build 1300.0.47.5) Checksums: sha1: 1e6bffb5623a56d33982f101520cde0a093d9f85 Back to all xcode release list Xcode Release 13.2 (build 13C5081f) Beta at 2021-11-16 Xcode Version: 13.2 (build 13C5081f) Beta Release Date: 2021-11-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.2_beta_2/Xcode_13.2_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.2 (build 19C5044a) macOS: Version 12.1 (build 21C5039a) tvOS: Version 15.2 (build 19K5043a) watchOS: Version 8.3 (build 19S5044a) Compilers: clang: Version 13.0.0 (build 1300.0.29.30) swift: Version 5.5.2 (build 1300.0.47.2) Checksums: sha1: 95ce1aed7b1874efd97b40596674968257faece4 Back to all xcode release list Xcode Release 13.2 (build 13C5066c) Beta at 2021-10-27 Xcode Version: 13.2 (build 13C5066c) Beta Release Date: 2021-10-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.2_beta/Xcode_13.2_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.2 (build 19C5026f) macOS: Version 12.1 (build 21C5021d) tvOS: Version 15.2 (build 19K5025e) watchOS: Version 8.3 (build 19S5026d) Compilers: clang: Version 13.0.0 (build 1300.0.29.30) swift: Version 5.5.2 (build 1300.0.40.106) Checksums: sha1: 3f646b172e33582fcc1f1e9c54ead41c6a8d2297 Back to all xcode release list Xcode Release 13.1 (build 13A1030d) at 2021-10-25 Xcode Version: 13.1 (build 13A1030d) Release Date: 2021-10-25 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.1/Xcode_13.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_1-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A339) macOS: Version 12.0 (build 21A344) tvOS: Version 15.0 (build 19J344) watchOS: Version 8.0.1 (build 19R351) Compilers: clang: Version 13.0.0 (build 1300.0.29.3) swift: Version 5.5.1 (build 1300.0.31.4) Checksums: sha1: b55777d005c7774e4756f29d875d241db1769d90 Back to all xcode release list Xcode Release 13.1 (build 13A1030d) at 2021-10-18 Xcode Version: 13.1 (build 13A1030d) Release Date: 2021-10-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13.1_Release_Candidate/Xcode_13.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_1-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A339) macOS: Version 12.0 (build 21A344) tvOS: Version 15.0 (build 19J344) watchOS: Version 8.0.1 (build 19R351) Compilers: clang: Version 13.0.0 (build 1300.0.29.3) swift: Version 5.5.1 (build 1300.0.31.4) Checksums: sha1: b55777d005c7774e4756f29d875d241db1769d90 Back to all xcode release list Xcode Release 13.0 (build 13A233) at 2021-9-20 Xcode Version: 13.0 (build 13A233) Release Date: 2021-9-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13/Xcode_13.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A339) macOS: Version 11.3 (build 20E214) tvOS: Version 15.0 (build 19J344) watchOS: Version 8.0 (build 19R341) Compilers: clang: Version 13.0.0 (build 1300.0.29.3) swift: Version 5.5 (build 1300.0.31.1) Checksums: sha1: 424ea14d86899290722906b3790af37ce9eea606 Back to all xcode release list Xcode Release 13.0 (build 13A233) at 2021-9-14 Xcode Version: 13.0 (build 13A233) Release Date: 2021-9-14 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13_Release_Candidate/Xcode_13_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A339) macOS: Version 11.3 (build 20E214) tvOS: Version 15.0 (build 19J344) watchOS: Version 8.0 (build 19R341) Compilers: clang: Version 13.0.0 (build 1300.0.29.3) swift: Version 5.5 (build 1300.0.31.1) Checksums: sha1: 424ea14d86899290722906b3790af37ce9eea606 Back to all xcode release list Xcode Release 13.0 (build 13A5212g) Beta at 2021-8-10 Xcode Version: 13.0 (build 13A5212g) Beta Release Date: 2021-8-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13_beta_5/Xcode_13_beta_5.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A5318g) macOS: Version 12.0 (build 21A5304f) tvOS: Version 15.0 (build 19J5325f) watchOS: Version 8.0 (build 19R5323f) Compilers: clang: Version 13.0.0 (build 1300.0.29.3) swift: Version 5.5 (build 1300.0.29.102) Checksums: sha1: 1d01ddcfa634c5ef2d858c1b3284e42cd9c928b7 Back to all xcode release list Xcode Release 13.0 (build 13A5201i) Beta at 2021-7-27 Xcode Version: 13.0 (build 13A5201i) Beta Release Date: 2021-7-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13_beta_4/Xcode_13_beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A5307d) macOS: Version 12.0 (build 21A5294d) tvOS: Version 15.0 (build 19J5314d) watchOS: Version 8.0 (build 19R5312d) Compilers: clang: Version 13.0.0 (build 1300.0.27.3) swift: Version 5.5 (build 1300.0.27.6) Checksums: sha1: 0c2c2b0d0a9853390bf7accb00cc95c3723277a3 Back to all xcode release list Xcode Release 13.0 (build 13A5192j) Beta at 2021-7-16 Xcode Version: 13.0 (build 13A5192j) Beta Release Date: 2021-7-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13_beta_3/Xcode_13_beta3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A5297f) macOS: Version 12.0 (build 21A5284e) tvOS: Version 15.0 (build 19J5304f) watchOS: Version 8.0 (build 19R5302g) Compilers: clang: Version 13.0.0 (build 1300.0.25.3) swift: Version 5.5 (build 1300.0.24.13) Checksums: sha1: 9e2a6f2e6665fbe551dfd1f526b058cf930a968c Back to all xcode release list Xcode Release 13.0 (build 13A5192i) Beta at 2021-7-14 Xcode Version: 13.0 (build 13A5192i) Beta Release Date: 2021-7-14 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13_beta_3/Xcode_13_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A5297f) macOS: Version 12.0 (build 21A5284e) tvOS: Version 15.0 (build 19J5304f) watchOS: Version 8.0 (build 19R5302g) Compilers: clang: Version 13.0.0 (build 1300.0.25.3) swift: Version 5.5 (build 1300.0.24.13) Checksums: sha1: 8c1f13f2d76b4beb153b85670dde49640dc08c30 Back to all xcode release list Xcode Release 13.0 (build 13A5155e) Beta at 2021-6-24 Xcode Version: 13.0 (build 13A5155e) Beta Release Date: 2021-6-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13_beta_2/Xcode_13_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A5281d) macOS: Version 12.0 (build 21A5268d) tvOS: Version 15.0 (build 19J5288d) watchOS: Version 8.0 (build 19R5286d) Compilers: clang: Version 13.0.0 (build 1300.0.18.6) swift: Version 5.5 (build 1300.0.20.104) Checksums: sha1: 4bb6141976252823b170e0869adbf0ed817b7e42 Back to all xcode release list Xcode Release 13.0 (build 13A5154h) Beta at 2021-6-7 Xcode Version: 13.0 (build 13A5154h) Beta Release Date: 2021-6-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_13_beta/Xcode_13_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes Requires: Mac OSX 11.3 SDKS: iOS: Version 15.0 (build 19A5261u) macOS: Version 12.0 (build 21A5248o) tvOS: Version 15.0 (build 19J5268q) watchOS: Version 8.0 (build 19R5266p) Compilers: clang: Version 13.0.0 (build 1300.0.18.6) swift: Version 5.5 (build 1300.0.19.104) Checksums: sha1: c57bf73df0c488507c5353b7d7730bf1206529be Back to all xcode release list Xcode Release 12.5.1 (build 12E507) at 2021-6-21 Xcode Version: 12.5.1 (build 12E507) Release Date: 2021-6-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.5.1/Xcode_12.5.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5_1-release-notes Requires: Mac OSX 11.0 SDKS: iOS: Version 14.5 (build 18E182) macOS: Version 11.3 (build 20E214) tvOS: Version 14.5 (build 18L191) watchOS: Version 7.4 (build 18T187) Compilers: clang: Version 12.0.5 (build 1205.0.22.11) swift: Version 5.4.2 (build 1205.0.28.2) Checksums: sha1: 315560dfcf1a26a71de1d2be22d20fa52bb3848b Back to all xcode release list Xcode Release 12.5 (build 12E262) at 2021-4-26 Xcode Version: 12.5 (build 12E262) Release Date: 2021-4-26 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.5/Xcode_12.5.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-release-notes Requires: Mac OSX 11.0 SDKS: iOS: Version 14.5 (build 18E182) macOS: Version 11.3 (build 20E214) tvOS: Version 14.5 (build 18L191) watchOS: Version 7.4 (build 18T187) Compilers: clang: Version 12.0.5 (build 1205.0.22.9) swift: Version 5.4 (build 1205.0.26.9) Checksums: sha1: 4dbc71f78317d8dd4868ce453a22be29d435e6f3 Back to all xcode release list Xcode Release 12.5 (build 12E262) at 2021-4-20 Xcode Version: 12.5 (build 12E262) Release Date: 2021-4-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.5_Release_Candidate/Xcode_12.5_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-release-notes Requires: Mac OSX 11.0 SDKS: iOS: Version 14.5 (build 18E182) macOS: Version 11.3 (build 20E214) tvOS: Version 14.5 (build 18L191) watchOS: Version 7.4 (build 18T187) Compilers: clang: Version 12.0.5 (build 1205.0.22.9) swift: Version 5.4 (build 1205.0.26.9) Checksums: sha1: 4dbc71f78317d8dd4868ce453a22be29d435e6f3 Back to all xcode release list Xcode Release 12.5 (build 12E5244e) Beta at 2021-3-2 Xcode Version: 12.5 (build 12E5244e) Beta Release Date: 2021-3-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.5_beta_3/Xcode_12.5_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-beta-release-notes/ Requires: Mac OSX 11.0 SDKS: iOS: Version 14.5 (build 18E5164d) macOS: Version 11.3 (build 20E5196d) tvOS: Version 14.5 (build 18L5173d) watchOS: Version 7.4 (build 18T5169d) Compilers: clang: Version 12.0.5 (build 1205.0.22.6) swift: Version 5.4 (build 1205.0.26.4) Checksums: sha1: e0cf43bec0c5bed98ec52668d322ccf2f53969b4 Back to all xcode release list Xcode Release 12.5 (build 12E5234g) Beta at 2021-2-16 Xcode Version: 12.5 (build 12E5234g) Beta Release Date: 2021-2-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.5_beta_2/Xcode_12.5_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-beta-release-notes/ Requires: Mac OSX 11.0 SDKS: iOS: Version 14.5 (build 18E5154g) macOS: Version 11.3 (build 20E5186d) tvOS: Version 14.5 (build 18L5163e) watchOS: Version 7.4 (build 18T5159g) Compilers: clang: Version 12.0.5 (build 1205.0.21.3) swift: Version 5.4 (build 1205.0.24.6) Checksums: sha1: d18783f32648f7284e54df74987fb594b66c5e37 Back to all xcode release list Xcode Release 12.5 (build 12E5220o) Beta at 2021-2-1 Xcode Version: 12.5 (build 12E5220o) Beta Release Date: 2021-2-1 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.5_beta/Xcode_12.5_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-beta-release-notes/ Requires: Mac OSX 11.0 SDKS: iOS: Version 14.5 (build 18E5140i) macOS: Version 11.3 (build 20E5172i) tvOS: Version 14.5 (build 18L5149i) watchOS: Version 7.4 (build 18T5144k) Compilers: clang: Version 12.0.5 (build 1205.0.19.34) swift: Version 5.4 (build 1205.0.16.12) Checksums: sha1: 7168e7735cac047091cf8c063de8a906bee781a2 Back to all xcode release list Xcode Release 12.4 (build 12D4e) at 2021-1-26 Xcode Version: 12.4 (build 12D4e) Release Date: 2021-1-26 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.4/Xcode_12.4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_4-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.4 (build 18D46) macOS: Version 11.1 (build 20C63) tvOS: Version 14.3 (build 18K559) watchOS: Version 7.2 (build 18S561) Compilers: clang: Version 12.0.0 (build 1200.0.32.29) swift: Version 5.3.2 (build 1200.0.45) Checksums: sha1: 85d77f3876bd3a955b4422e10d2e9acd9a11f104 Back to all xcode release list Xcode Release 12.4 (build 12D4e) at 2021-1-21 Xcode Version: 12.4 (build 12D4e) Release Date: 2021-1-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.4_Release_Candidate/Xcode_12.4_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_4-rc-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.4 (build 18D46) macOS: Version 11.1 (build 20C63) tvOS: Version 14.3 (build 18K559) watchOS: Version 7.2 (build 18S561) Compilers: clang: Version 12.0.0 (build 1200.0.32.29) swift: Version 5.3.2 (build 1200.0.45) Checksums: sha1: 85d77f3876bd3a955b4422e10d2e9acd9a11f104 Back to all xcode release list Xcode Release 12.3 (build 12C33) at 2020-12-14 Xcode Version: 12.3 (build 12C33) Release Date: 2020-12-14 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.3/Xcode_12.3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_3-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.3 (build 18C61) macOS: Version 11.1 (build 20C63) tvOS: Version 14.3 (build 18K559) watchOS: Version 7.2 (build 18S561) Compilers: clang: Version 12.0.0 (build 1200.0.32.28) swift: Version 5.3.2 (build 1200.0.45) Checksums: sha1: 2e06e98d11662abc64b0abe2217c094fd907433f Back to all xcode release list Xcode Release 12.3 (build 12C33) at 2020-12-8 Xcode Version: 12.3 (build 12C33) Release Date: 2020-12-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.3_Release_Candidate/Xcode_12.3_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_3-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.3 (build 18C61) macOS: Version 11.1 (build 20C63) tvOS: Version 14.3 (build 18K559) watchOS: Version 7.2 (build 18S561) Compilers: clang: Version 12.0.0 (build 1200.0.32.28) swift: Version 5.3.2 (build 1200.0.45) Checksums: sha1: 2e06e98d11662abc64b0abe2217c094fd907433f Back to all xcode release list Xcode Release 12.3 (build 12C5020f) Beta at 2020-11-12 Xcode Version: 12.3 (build 12C5020f) Beta Release Date: 2020-11-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.3_beta/Xcode_12.3_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_3-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.3 (build 18C5044f) macOS: Version 11.1 (build 20C5048g) tvOS: Version 14.3 (build 18K5545f) watchOS: Version 7.2 (build 18S5545f) Compilers: clang: Version 12.0.0 (build 1200.0.32.28) swift: Version 5.3.2 (build 1200.0.44.1) Checksums: sha1: 9fa1a107c0c5a19d5b41502a960d44e219ecc3cf Back to all xcode release list Xcode Release 12.2 (build 12B45b) at 2020-11-12 Xcode Version: 12.2 (build 12B45b) Release Date: 2020-11-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.2 (build 18B79) macOS: Version 11.0 (build 20A2408) tvOS: Version 14.2 (build 18K54) watchOS: Version 7.1 (build 18R579) Compilers: clang: Version 12.0.0 (build 1200.0.32.27) swift: Version 5.3.1 (build 1200.0.41) Checksums: sha1: 6f38028b35828d28ccf8352ce4dff376f8d1132e Back to all xcode release list Xcode Release 12.2 (build 12B5044c) at 2020-11-5 Xcode Version: 12.2 (build 12B5044c) Release Date: 2020-11-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.2_Release_Candidate/Xcode_12.2_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.2 (build 18B79) macOS: Version 11.0 (build 20A5408a) tvOS: Version 14.2 (build 18K54) watchOS: Version 7.1 (build 18R579) Compilers: clang: Version 12.0.0 (build 1200.0.32.27) swift: Version 5.3.1 (build 1200.0.41) Checksums: sha1: a446710258e555978f1bb3e96218a4315509df86 Back to all xcode release list Xcode Release 12.1.1 (build 12A7605b) at 2020-10-30 Xcode Version: 12.1.1 (build 12A7605b) Release Date: 2020-10-30 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.1.1_Release_Candidate/Xcode_12.1.1_Release_Candidate.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_1_1-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.2 (build 18B79) macOS: Version 10.15.6 (build 19G68) tvOS: Version 14.2 (build 18K54) watchOS: Version 7.1 (build 18R579) Compilers: clang: Version 12.0.0 (build 1200.0.32.21) swift: Version 5.3 (build 1200.0.29.2) Checksums: sha1: 940320913ac3a7401f5f9ab45c0410dc717c52ee Back to all xcode release list Xcode Release 12.1 (build 12A7403) at 2020-10-20 Xcode Version: 12.1 (build 12A7403) Release Date: 2020-10-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_1-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.1 (build 18A8394) macOS: Version 10.15.6 (build 19G68) tvOS: Version 14.0 (build 18J390) watchOS: Version 7.0 (build 18R382) Compilers: clang: Version 12.0.0 (build 1200.0.32.21) swift: Version 5.3 (build 1200.0.29.2) Checksums: sha1: 722c4f0316e7c469294c277eaf59975c1a40e061 Back to all xcode release list Xcode Release 12.1 (build 12A7403) at 2020-10-13 Xcode Version: 12.1 (build 12A7403) Release Date: 2020-10-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.1_GM_seed/Xcode_12.1_GM_seed.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_1-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.1 (build 18A8394) macOS: Version 10.15.6 (build 19G68) tvOS: Version 14.0 (build 18J390) watchOS: Version 7.0 (build 18R382) Compilers: clang: Version 12.0.0 (build 1200.0.32.21) swift: Version 5.3 (build 1200.0.29.2) Checksums: sha1: 722c4f0316e7c469294c277eaf59975c1a40e061 Back to all xcode release list Xcode Release 12.2 (build 12B5035g) Beta at 2020-10-13 Xcode Version: 12.2 (build 12B5035g) Beta Release Date: 2020-10-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.2_beta_3/Xcode_12.2_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-beta-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.2 (build 18B5072e) macOS: Version 11.0 (build 20A5395d) tvOS: Version 14.2 (build 18K5047e) watchOS: Version 7.1 (build 18R5572e) Compilers: clang: Version 12.0.0 (build 1200.0.32.27) swift: Version 5.3.1 (build 1200.0.41) Checksums: sha1: 39c3d671338bc383a9a4ebb6622146ed932c8493 Back to all xcode release list Xcode Release 12.2 (build 12B5025f) Beta at 2020-9-29 Xcode Version: 12.2 (build 12B5025f) Beta Release Date: 2020-9-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.2_beta_2/Xcode_12.2_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-beta-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.2 (build 18B5061d) macOS: Version 11.0 (build 20A5384b) tvOS: Version 14.2 (build 18K5036d) watchOS: Version 7.1 (build 18R5561d) Compilers: clang: Version 12.0.0 (build 1200.0.32.6) swift: Version 5.3.1 (build 1200.0.39) Checksums: sha1: 3987484df673dc42c6b5b2966acb93d9c61775c7 Back to all xcode release list Xcode Release 12.0.1 (build 12A7300) at 2020-9-24 Xcode Version: 12.0.1 (build 12A7300) Release Date: 2020-9-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.0.1/Xcode_12.0.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_0_1-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A390) macOS: Version 10.15.6 (build 19G68) tvOS: Version 14.0 (build 18J390) watchOS: Version 7.0 (build 18R382) Compilers: clang: Version 12.0.0 (build 1200.0.32.2) swift: Version 5.3 (build 1200.0.29.2) Checksums: sha1: 811c779b1bd0b1c83d552502e352c128610f28f7 Back to all xcode release list Xcode Release 12.0 (build 12A7209) at 2020-9-17 Xcode Version: 12.0 (build 12A7209) Release Date: 2020-9-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12/Xcode_12.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A390) macOS: Version 10.15.6 (build 19G68) tvOS: Version 14.0 (build 18J390) watchOS: Version 7.0 (build 18R382) Compilers: clang: Version 12.0.0 (build 1200.0.32.2) swift: Version 5.3 (build 1200.0.29.2) Checksums: sha1: 1b69c0f8e7b35c1456211143bbb06c671fcfaaec Back to all xcode release list Xcode Release 12.2 (build 12B5018i) Beta at 2020-9-17 Xcode Version: 12.2 (build 12B5018i) Beta Release Date: 2020-9-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12.2_beta/Xcode_12.2_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.2 (build 18B5052f) macOS: Version 11.0 (build 20A5374f) tvOS: Version 14.2 (build 18K5027e) watchOS: Version 7.1 (build 18R5552f) Compilers: clang: Version 12.0.0 (build 1200.0.32.4) swift: Version 5.3.1 (build 1200.0.35) Checksums: sha1: de36198422072ebc908cdc111b343a8f10d6e8ea Back to all xcode release list Xcode Release 12.0 (build 12A7209) at 2020-9-15 Xcode Version: 12.0 (build 12A7209) Release Date: 2020-9-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_GM_seed/Xcode_12_GM_seed.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes/ Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A390) macOS: Version 10.15.6 (build 19G68) tvOS: Version 14.0 (build 18J390) watchOS: Version 7.0 (build 18R382) Compilers: clang: Version 12.0.0 (build 1200.0.32.2) swift: Version 5.3 (build 1200.0.29.2) Checksums: sha1: 1b69c0f8e7b35c1456211143bbb06c671fcfaaec Back to all xcode release list Xcode Release 12.0 (build 12A8189n) Beta at 2020-8-25 Xcode Version: 12.0 (build 12A8189n) Beta Release Date: 2020-8-25 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_beta_6/Xcode_12_beta_6.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5357e) macOS: Version 11.0 (build 20A5354g) tvOS: Version 14.0 (build 18J5370e) watchOS: Version 7.0 (build 18R5368d) Compilers: clang: Version 12.0.0 (build 1200.0.31.1) swift: Version 5.3 (build 1200.0.28.1) Checksums: sha1: c491b29b34c5ca9aa350a72a64e07e634c235618 Back to all xcode release list Xcode Release 12.0 (build 12A8189h) Beta at 2020-8-18 Xcode Version: 12.0 (build 12A8189h) Beta Release Date: 2020-8-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_beta_5/Xcode_12_beta_5.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5351d) macOS: Version 11.0 (build 20A5354g) tvOS: Version 14.0 (build 18J5364d) watchOS: Version 7.0 (build 18R5361c) Compilers: clang: Version 12.0.0 (build 1200.0.31.1) swift: Version 5.3 (build 1200.0.28.1) Checksums: sha1: 2964368078d0bdf4cf1251ed36f5a5af1139218d Back to all xcode release list Xcode Release 12.0 (build 12A8179i) Beta at 2020-8-4 Xcode Version: 12.0 (build 12A8179i) Beta Release Date: 2020-8-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_beta_4/Xcode_12_beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5342e) macOS: Version 11.0 (build 20A5343f) tvOS: Version 14.0 (build 18J5354e) watchOS: Version 7.0 (build 18R5350e) Compilers: clang: Version 12.0.0 (build 1200.0.28.3) swift: Version 5.3 (build 1200.0.25.2) Checksums: sha1: f13949dbfff088b6f1ef7a6d9aebb92a25ef6a0c Back to all xcode release list Xcode Release 12.0 (build 12A8169g) Beta at 2020-7-22 Xcode Version: 12.0 (build 12A8169g) Beta Release Date: 2020-7-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_beta_3/Xcode_12_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5332e) macOS: Version 11.0 (build 20A5323l) tvOS: Version 14.0 (build 18J5344e) watchOS: Version 7.0 (build 18R5340d) Compilers: clang: Version 12.0.0 (build 1200.0.26.2) swift: Version 5.3 (build 1200.0.22.4) Checksums: sha1: f08d4a804cd73ce5a12f93dc61d3132e3d342aa0 Back to all xcode release list Xcode Release 12.0 (build 12A8161k) Beta at 2020-7-7 Xcode Version: 12.0 (build 12A8161k) Beta Release Date: 2020-7-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_for_macOS_Universal_Apps_beta_2/Xcode_12_for_macOS_Universal_Apps_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-for-macos-universal-apps-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5319g) macOS: Version 11.0 (build 20A5299v) Compilers: clang: Version 12.0.0 (build 1200.0.22.41) swift: Version 5.3 (build 1200.0.16.15) Checksums: sha1: c1de0c1f625859d4ce4baba522321afb071c46de Back to all xcode release list Xcode Release 12.0 (build 12A6163b) Beta at 2020-7-7 Xcode Version: 12.0 (build 12A6163b) Beta Release Date: 2020-7-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_beta_2/Xcode_12_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5319g) macOS: Version 10.16 (build 20A4299v) tvOS: Version 14.0 (build 18J5331g) watchOS: Version 7.0 (build 18R5327i) Compilers: clang: Version 12.0.0 (build 1200.0.22.8) swift: Version 5.3 (build 1200.0.16.13) Checksums: sha1: 8a7375ee790bab0c32057727cdd497633d74537e Back to all xcode release list Xcode Release 12.0 (build 12A8158a) Beta at 2020-6-22 Xcode Version: 12.0 (build 12A8158a) Beta Release Date: 2020-6-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_for_macOS_Universal_Apps_beta/Xcode_12_for_macOS_Universal_Apps_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-for-macos-universal-apps-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5301v) macOS: Version 11.0 (build 20A5299v) Compilers: clang: Version 12.0.0 (build 1200.0.22.19) swift: Version 5.3 (build 1200.0.16.13) Checksums: sha1: acf85719da17d4190f57cbf7c04653ade5bbeba5 Back to all xcode release list Xcode Release 12.0 (build 12A6159) Beta at 2020-6-22 Xcode Version: 12.0 (build 12A6159) Beta Release Date: 2020-6-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_12_beta/Xcode_12_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes Requires: Mac OSX 10.15.4 SDKS: iOS: Version 14.0 (build 18A5301v) macOS: Version 10.16 (build 20A4299v) tvOS: Version 14.0 (build 18J5313t) watchOS: Version 7.0 (build 18R5310a) Compilers: clang: Version 12.0.0 (build 1200.0.22.7) swift: Version 5.3 (build 1200.0.16.9) Checksums: sha1: 6c9bd8a762ac01d1030f4cc64f25784f787447bd Back to all xcode release list Xcode Release 11.7 (build 11E801a) at 2020-9-1 Xcode Version: 11.7 (build 11E801a) Release Date: 2020-9-1 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.7/Xcode_11.7.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-11_7-release-notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.7 (build 17H22) macOS: Version 10.15.6 (build 19G68) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: 6cf1dbd6646d790a99e70501e0c6560f4e0b9f46 Back to all xcode release list Xcode Release 11.7 (build 11E801a) Beta at 2020-8-26 Xcode Version: 11.7 (build 11E801a) Beta Release Date: 2020-8-26 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.7_beta/Xcode_11.7_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-11_7-beta-release-notes/ Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.7 (build 17H22) macOS: Version 10.15.6 (build 19G68) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: 6cf1dbd6646d790a99e70501e0c6560f4e0b9f46 Back to all xcode release list Xcode Release 11.6 (build 11E708) at 2020-7-15 Xcode Version: 11.6 (build 11E708) Release Date: 2020-7-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.6/Xcode_11.6.xip Release Notes URL: https://developer.apple.com/documentation/xcode-release-notes/xcode-11_6-release-notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.6 (build 17G64) macOS: Version 10.15.6 (build 19G68) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: 1313680c15af41fa39be95457a13134ec7699ccc Back to all xcode release list Xcode Release 11.6 (build 11N700h) Beta at 2020-6-9 Xcode Version: 11.6 (build 11N700h) Beta Release Date: 2020-6-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.6_beta/Xcode_11.6_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_6_beta_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.6 (build 17G5045b) macOS: Version 10.15.4 (build 19E258) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: a65fbe2314b3abff410ea9eaeb02eed055fd55df Back to all xcode release list Xcode Release 11.5 (build 11E608c) at 2020-5-20 Xcode Version: 11.5 (build 11E608c) Release Date: 2020-5-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.5/Xcode_11.5.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_5_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.5 (build 17F65) macOS: Version 10.15.4 (build 19E258) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: 4654b261841d0336cb90ea1c82d15fd7aa03c982 Back to all xcode release list Xcode Release 11.5 (build 11E608c) at 2020-5-18 Xcode Version: 11.5 (build 11E608c) Release Date: 2020-5-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.5_GM_Seed/Xcode_11.5_GM_Seed.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_5_gm_seed_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.5 (build 17F65) macOS: Version 10.15.4 (build 19E258) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: 4654b261841d0336cb90ea1c82d15fd7aa03c982 Back to all xcode release list Xcode Release 11.5 (build 11N605f) Beta at 2020-5-6 Xcode Version: 11.5 (build 11N605f) Beta Release Date: 2020-5-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.5_beta_2/Xcode_11.5_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_5_beta_2_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.5 (build 17F5065a) macOS: Version 10.15.4 (build 19E258) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: 5c18ee9ecd77439d0981005d6d69ef2ea6894a6c Back to all xcode release list Xcode Release 11.5 (build 11N605c) Beta at 2020-4-29 Xcode Version: 11.5 (build 11N605c) Beta Release Date: 2020-4-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.5_beta/Xcode_11.5_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_5_beta_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.5 (build 17F5054f) macOS: Version 10.15.4 (build 19E258) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.62) swift: Version 5.2.4 (build 1103.0.32.9) Checksums: sha1: 65aec9569554c8952bb145f9d33a65895ef1966d Back to all xcode release list Xcode Release 11.4.1 (build 11E503a) at 2020-4-16 Xcode Version: 11.4.1 (build 11E503a) Release Date: 2020-4-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.4.1/Xcode_11.4.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_1_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.4.1 (build 17E8258) macOS: Version 10.15.4 (build 19E258) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.59) swift: Version 5.2.2 (build 1103.0.32.6) Checksums: sha1: 32a106e48c9907cd230d6a27e923e9aaf6685358 Back to all xcode release list Xcode Release 11.4 (build 11E146) at 2020-3-24 Xcode Version: 11.4 (build 11E146) Release Date: 2020-3-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.4/Xcode_11.4.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.4 (build 17E255) macOS: Version 10.15.4 (build 19E258) tvOS: Version 13.4 (build 17L255) watchOS: Version 6.2 (build 17T255) Compilers: clang: Version 11.0.3 (build 1103.0.32.29) swift: Version 5.2 (build 1103.0.32.1) Checksums: sha1: 7c1151670760be55c5c8b09be1aa2a17291dc468 Back to all xcode release list Xcode Release 11.4 (build 11N132i) Beta at 2020-3-3 Xcode Version: 11.4 (build 11N132i) Beta Release Date: 2020-3-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.4_beta_3/Xcode_11.4_beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_beta_3_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.4 (build 17E5249a) macOS: Version 10.15.4 (build 19E250a) tvOS: Version 13.4 (build 17L5251a) watchOS: Version 6.2 (build 17T5250a) Compilers: clang: Version 11.0.3 (build 1103.0.32.26) swift: Version 5.2 (build 1103.0.30) Checksums: sha1: 6fdfcf4e915fa54cfffba828fb5f314caeb37b13 Back to all xcode release list Xcode Release 11.4 (build 11N123k) Beta at 2020-2-19 Xcode Version: 11.4 (build 11N123k) Beta Release Date: 2020-2-19 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.4_beta_2/Xcode_11.4_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_beta_2_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.4 (build 17E5233e) macOS: Version 10.15.4 (build 19E234g) tvOS: Version 13.4 (build 17L5235d) watchOS: Version 6.2 (build 17T5234d) Compilers: clang: Version 11.0.3 (build 1103.0.32.2) swift: Version 5.2 (build 1103.2.32.5) Checksums: sha1: a55e450133c2d49e1986f33026768fe8dbb223aa Back to all xcode release list Xcode Release 11.4 (build 11N111s) Beta at 2020-2-5 Xcode Version: 11.4 (build 11N111s) Beta Release Date: 2020-2-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.4_beta/Xcode_11.4_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_beta_release_notes Requires: Mac OSX 10.15.2 SDKS: iOS: Version 13.4 (build 17E5223h) macOS: Version 10.15.4 (build 19E224g) tvOS: Version 13.4 (build 17L5225g) watchOS: Version 6.2 (build 17T5224g) Compilers: clang: Version 11.0.3 (build 1103.0.30.11) swift: Version 5.2 (build 1103.0.22) Checksums: sha1: 14e4e508734112a8f582d58651e1b0459bc575ec Back to all xcode release list Xcode Release 11.3.1 (build 11C505) at 2020-1-13 Xcode Version: 11.3.1 (build 11C505) Release Date: 2020-1-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_3_1_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2.2 (build 17B102) macOS: Version 10.15.1 (build 19B90) tvOS: Version 13.2 (build 17K90) watchOS: Version 6.1 (build 17S80) Compilers: clang: Version 11.0.0 (build 1100.0.33.17) swift: Version 5.1.3 (build 1100.0.282.1) Checksums: sha1: d5773e61189595cbb639c3e1c460b38d8c1e19ae Back to all xcode release list Xcode Release 11.3 (build 11C29) at 2019-12-10 Xcode Version: 11.3 (build 11C29) Release Date: 2019-12-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.3/Xcode_11.3.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_3_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2.2 (build 17B102) macOS: Version 10.15.1 (build 19B90) tvOS: Version 13.2 (build 17K90) watchOS: Version 6.1 (build 17S80) Compilers: clang: Version 11.0.0 (build 1100.0.33.16) swift: Version 5.1.3 (build 1100.0.282.1) Checksums: sha1: 7c192e5023cb5d538c601ce301dc69972102d99f Back to all xcode release list Xcode Release 11.3 (build 11C24b) Beta at 2019-11-13 Xcode Version: 11.3 (build 11C24b) Beta Release Date: 2019-11-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.3_beta/Xcode_11.3_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_3_beta_release_notes/ Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2.2 (build 17B102) macOS: Version 10.15.1 (build 19B90) tvOS: Version 13.2 (build 17K90) watchOS: Version 6.1 (build 17S80) Compilers: clang: Version 11.0.0 (build 1100.0.33.15) swift: Version 5.1.3 (build 1100.0.282) Checksums: sha1: 2f455410ec068e233125f964a6209c3f5447f735 Back to all xcode release list Xcode Release 11.2.1 (build 11B500) at 2019-11-12 Xcode Version: 11.2.1 (build 11B500) Release Date: 2019-11-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.2.1/Xcode_11.2.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_1_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2.2 (build 17B102) macOS: Version 10.15.1 (build 19B89) tvOS: Version 13.2 (build 17K90) watchOS: Version 6.1 (build 17S80) Compilers: clang: Version 11.0.0 (build 1100.0.33.12) swift: Version 5.1.2 (build 1100.0.278) Checksums: sha1: c315f36b0e9e524ee9f9cd796c820e2bed83bac4 Back to all xcode release list Xcode Release 11.2.1 (build 11B53) at 2019-11-5 Xcode Version: 11.2.1 (build 11B53) Release Date: 2019-11-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.2.1_GM_Seed/Xcode_11.2.1_GM_Seed.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_1_gm_seed_release_notes/ Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2.2 (build 17B102) macOS: Version 10.15.1 (build 19B89) tvOS: Version 13.2 (build 17K90) watchOS: Version 6.1 (build 17S80) Compilers: clang: Version 11.0.0 (build 1100.0.33.12) swift: Version 5.1.2 (build 1100.0.278) Checksums: sha1: fc4ebcd7ed261d35d01084c73df54c1ef979c834 Back to all xcode release list Xcode Release 11.2 (build 11B52) at 2019-10-31 Xcode Version: 11.2 (build 11B52) Release Date: 2019-10-31 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.2/Xcode_11.2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2 (build 17B80) macOS: Version 10.15.1 (build 19B81) tvOS: Version 13.2 (build 17K81) watchOS: Version 6.1 (build 17S80) Compilers: clang: Version 11.0.0 (build 1100.0.33.12) swift: Version 5.1.2 (build 1100.0.278) Checksums: sha1: 086dc9123834779f47303f264993770b58ab1d9d Back to all xcode release list Xcode Release 11.2 (build 11B44) Beta at 2019-10-11 Xcode Version: 11.2 (build 11B44) Beta Release Date: 2019-10-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.2_beta_2/Xcode_11.2_beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_beta_2_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2 (build 17B5068e) macOS: Version 10.15.1 (build 19B68e) tvOS: Version 13.2 (build 17K5068b) watchOS: Version 6.1 (build 17S5068e) Compilers: clang: Version 11.0.0 (build 1100.0.33.11) swift: Version 5.1.1 (build 1100.0.275.2) Checksums: sha1: f7201b2d2277d365a0252cfee9769dd08a0e9516 Back to all xcode release list Xcode Release 11.1 (build 11A1027) at 2019-10-7 Xcode Version: 11.1 (build 11A1027) Release Date: 2019-10-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.1/Xcode_11.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_1_release_notes/ Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.1 (build 17A820) macOS: Version 10.15 (build 19A547) tvOS: Version 13.0 (build 17J559) watchOS: Version 6.0 (build 17R566) Compilers: clang: Version 11.0.0 (build 1100.0.33.8) swift: Version 5.1 (build 1100.0.270.13) Checksums: sha1: c370f332d6a65f878b40d1e9d14b9ef8f1b13aae Back to all xcode release list Xcode Release 11.2 (build 11B41) Beta at 2019-10-2 Xcode Version: 11.2 (build 11B41) Beta Release Date: 2019-10-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.2_beta/Xcode_11.2_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_beta_release_notes/ Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.2 (build 17B5059f) macOS: Version 10.15 (build 19A547) tvOS: Version 13.2 (build 17K5059e) watchOS: Version 6.1 (build 17S5059d) Compilers: clang: Version 11.0.0 (build 1100.0.33.9) swift: Version 5.1.1 (build 1100.0.274.1) Checksums: sha1: c57a2e109cfc651d203b09e4614f8729717767cb Back to all xcode release list Xcode Release 11.1 (build 11A1027) at 2019-9-24 Xcode Version: 11.1 (build 11A1027) Release Date: 2019-9-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11.1_GM_Seed/Xcode_11.1_GM_Seed.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_1_release_notes/ Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.1 (build 17A820) macOS: Version 10.15 (build 19A547) tvOS: Version 13.0 (build 17J559) watchOS: Version 6.0 (build 17R566) Compilers: clang: Version 11.0.0 (build 1100.0.33.8) swift: Version 5.1 (build 1100.0.270.13) Checksums: sha1: c370f332d6a65f878b40d1e9d14b9ef8f1b13aae Back to all xcode release list Xcode Release 11.0 (build 11A420a) at 2019-9-20 Xcode Version: 11.0 (build 11A420a) Release Date: 2019-9-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11/Xcode_11.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A566) macOS: Version 10.15 (build 19A547) tvOS: Version 13.0 (build 17J559) watchOS: Version 6.0 (build 17R566) Compilers: clang: Version 11.0.0 (build 1100.0.33.8) swift: Version 5.1 (build 1100.0.270.13) Checksums: sha1: 56d3480bb706429c4c15e422d65804ad039338bc Back to all xcode release list Xcode Release 11.0 (build 11A420a) at 2019-9-16 Xcode Version: 11.0 (build 11A420a) Release Date: 2019-9-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_GM_Seed_2/Xcode_11_GM_Seed_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A566) macOS: Version 10.15 (build 19A547) tvOS: Version 13.0 (build 17J559) watchOS: Version 6.0 (build 17R566) Compilers: clang: Version 11.0.0 (build 1100.0.33.8) swift: Version 5.1 (build 1100.0.270.13) Checksums: sha1: 56d3480bb706429c4c15e422d65804ad039338bc Back to all xcode release list Xcode Release 11.0 (build 11A419c) at 2019-9-10 Xcode Version: 11.0 (build 11A419c) Release Date: 2019-9-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_GM_Seed/Xcode_11_GM_Seed.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A566) macOS: Version 10.15 (build 19A547) tvOS: Version 13.0 (build 17J559) watchOS: Version 6.0 (build 17R566) Compilers: clang: Version 11.0.0 (build 1100.0.33.8) swift: Version 5.1 (build 1100.0.270.13) Checksums: sha1: ec44755a2101dc4c72cc7b35cfb68e2208f7c522 Back to all xcode release list Xcode Release 11.0 (build 11M392r) Beta at 2019-8-27 Xcode Version: 11.0 (build 11M392r) Beta Release Date: 2019-8-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_Beta_7/Xcode_11_Beta_7.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_7_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A5556d) macOS: Version 10.15 (build 19A536d) tvOS: Version 13.0 (build 17J5549c) watchOS: Version 6.0 (build 17R5556d) Compilers: clang: Version 11.0.0 (build 1100.0.33.5) swift: Version 5.1 (build 1100.0.270.6) Checksums: sha1: 33eef80728577557f640d7b114864d58ab3b0679 Back to all xcode release list Xcode Release 11.0 (build 11M392q) Beta at 2019-8-19 Xcode Version: 11.0 (build 11M392q) Beta Release Date: 2019-8-19 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_Beta_6/Xcode_11_Beta_6.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_6_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A5556d) macOS: Version 10.15 (build 19A536d) tvOS: Version 13.0 (build 17J5549c) watchOS: Version 6.0 (build 17R5556d) Compilers: clang: Version 11.0.0 (build 1100.0.33.5) swift: Version 5.1 (build 1100.0.270.6) Checksums: sha1: 30c11cf25ff14231e12e0abc117f296dcf8de021 Back to all xcode release list Xcode Release 11.0 (build 11M382q) Beta at 2019-7-29 Xcode Version: 11.0 (build 11M382q) Beta Release Date: 2019-7-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_Beta_5/Xcode_11_Beta_5.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_5_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A5547d) macOS: Version 10.15 (build 19A526e) tvOS: Version 13.0 (build 17J5540d) watchOS: Version 6.0 (build 17R5546d) Compilers: clang: Version 11.0.0 (build 1100.0.32.5) swift: Version 5.1 (build 1100.0.266.1) Checksums: sha1: 7ce156434cb6dfdb3cf743c843cf9f65c3044487 Back to all xcode release list Xcode Release 11.0 (build 11M374r) Beta at 2019-7-17 Xcode Version: 11.0 (build 11M374r) Beta Release Date: 2019-7-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_Beta_4/Xcode_11_Beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_4_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A5534d) macOS: Version 10.15 (build 19A512e) tvOS: Version 13.0 (build 17J5526d) watchOS: Version 6.0 (build 17R5532d) Compilers: clang: Version 11.0.0 (build 1100.0.31.5) swift: Version 5.1 (build 1100.0.257.2) Checksums: sha1: 0dceb035c3a3258af3fa7b3d08756da2c80f7808 Back to all xcode release list Xcode Release 11.0 (build 11M362v) Beta at 2019-7-2 Xcode Version: 11.0 (build 11M362v) Beta Release Date: 2019-7-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_Beta_3/Xcode_11_Beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_3_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A5522e) macOS: Version 10.15 (build 19A501g) tvOS: Version 13.0 (build 17J5515e) watchOS: Version 6.0 (build 17R5521e) Compilers: clang: Version 11.0.0 (build 1100.0.28.3) swift: Version 5.1 (build 1100.0.212.5) Checksums: sha1: a39d703a28c3af7679c1dfd3f65a18bd4999fed4 Back to all xcode release list Xcode Release 11.0 (build 11M337n) Beta at 2019-6-17 Xcode Version: 11.0 (build 11M337n) Beta Release Date: 2019-6-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_11_Beta_2/Xcode_11_Beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_2_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A5508l) macOS: Version 10.15 (build 19A487k) tvOS: Version 13.0 (build 17J5501l) watchOS: Version 6.0 (build 17R5507k) Compilers: clang: Version 11.0.0 (build 1100.0.20.17) swift: Version 5.1 (build 1100.0.43.3) Checksums: sha1: f8f9583bb83d44c37522f82ef92697fb784e3652 Back to all xcode release list Xcode Release 11.0 (build 11M336w) Beta at 2019-6-3 Xcode Version: 11.0 (build 11M336w) Beta Release Date: 2019-6-3 Direct Download URL: https://download.developer.apple.com/WWDC_2019/Xcode_11_Beta/Xcode_11_Beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_release_notes Requires: Mac OSX 10.14.4 SDKS: iOS: Version 13.0 (build 17A5492t) macOS: Version 10.15 (build 19A471t) tvOS: Version 13.0 (build 17J5485u) watchOS: Version 6.0 (build 17R5491t) Compilers: clang: Version 11.0.0 (build 1100.0.20.17) swift: Version 5.1 (build 1100.0.38.29) Checksums: sha1: 5a1bdd7898ffb69acc76864b69a01404eb522683 Back to all xcode release list Xcode Release 10.3 (build 10G8) at 2019-7-22 Xcode Version: 10.3 (build 10G8) Release Date: 2019-7-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.3/Xcode_10.3.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_3_release_notes/ Requires: Mac OSX 10.14.3 SDKS: iOS: Version 12.4 (build 16G73) macOS: Version 10.14.6 (build 18G74) tvOS: Version 12.4 (build 16M567) watchOS: Version 5.3 (build 16U567) Compilers: clang: Version 10.0.1 (build 1001.0.46.4) swift: Version 5.0.1 (build 1001.0.82.4) Checksums: sha1: c5f5d2f6513ae67097038892470f01fd1b490bdd Back to all xcode release list Xcode Release 10.2.1 (build 10E1001) at 2019-4-17 Xcode Version: 10.2.1 (build 10E1001) Release Date: 2019-4-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.2.1/Xcode_10.2.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_1_release_notes/ Requires: Mac OSX 10.14.3 SDKS: iOS: Version 12.2 (build 16E226) macOS: Version 10.14.4 (build 18E219) tvOS: Version 12.2 (build 16L225) watchOS: Version 5.2 (build 16T224) Compilers: clang: Version 10.0.1 (build 1001.0.46.4) swift: Version 5.0.1 (build 1001.0.82.4) Checksums: sha1: e7c9bbaa4b70b6563e893dfa6c6923a9b8a2e60e Back to all xcode release list Xcode Release 10.2 (build 10E125) at 2019-3-25 Xcode Version: 10.2 (build 10E125) Release Date: 2019-3-25 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.2/Xcode_10.2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes Requires: Mac OSX 10.14.3 SDKS: iOS: Version 12.2 (build 16E226) macOS: Version 10.14.4 (build 18E219) tvOS: Version 12.2 (build 16L225) watchOS: Version 5.2 (build 16T224) Compilers: clang: Version 10.0.1 (build 1001.0.46.3) swift: Version 5.0 (build 1001.0.69.5) Checksums: sha1: c4218a7527acd84ab57688308ab33fabd2bb76b2 Back to all xcode release list Xcode Release 10.2 (build 10P107d) Beta at 2019-3-4 Xcode Version: 10.2 (build 10P107d) Beta Release Date: 2019-3-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.2_beta_4/Xcode_10.2_beta_4.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_beta_4_release_notes Requires: Mac OSX 10.14.3 SDKS: iOS: Version 12.2 (build 16E5212e) macOS: Version 10.14.4 (build 18E205d) tvOS: Version 12.2 (build 16L5212d) watchOS: Version 5.2 (build 16T5212d) Compilers: clang: Version 10.0.1 (build 1001.0.46.2) swift: Version 5.0 (build 1001.0.69) Checksums: sha1: bd9759243fb0466b2ab7034c4937728841fc7bfc Back to all xcode release list Xcode Release 10.2 (build 10P99q) Beta at 2019-2-19 Xcode Version: 10.2 (build 10P99q) Beta Release Date: 2019-2-19 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.2_Beta_3/Xcode_10.2_Beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_beta_3_release_notes Requires: Mac OSX 10.14 SDKS: iOS: Version 12.2 (build 16E5201d) macOS: Version 10.14.4 (build 18E194d) tvOS: Version 12.2 (build 16L5201d) watchOS: Version 5.2 (build 16T5201c) Compilers: clang: Version 10.0.1 (build 1001.0.43.3) swift: Version 5.0 (build 1001.0.63.8) Checksums: sha1: ff894387803d30f4f774eae6f06e6cf07152dcd4 Back to all xcode release list Xcode Release 10.2 (build 10P91b) Beta at 2019-2-4 Xcode Version: 10.2 (build 10P91b) Beta Release Date: 2019-2-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.2_Beta_2/Xcode_10.2_Beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_beta_2_release_notes Requires: Mac OSX 10.14 SDKS: iOS: Version 12.2 (build 16E5191d) macOS: Version 10.14.4 (build 18E184e) tvOS: Version 12.2 (build 16L5191d) watchOS: Version 5.2 (build 16T5191d) Compilers: clang: Version 10.0.1 (build 1001.0.37.9) swift: Version 5.0 (build 1001.0.60.3) Checksums: sha1: d6b06aba7cecb52287e003dedf4a0e039815cce4 Back to all xcode release list Xcode Release 10.2 (build 10P82s) Beta at 2019-1-24 Xcode Version: 10.2 (build 10P82s) Beta Release Date: 2019-1-24 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.2_beta/Xcode_10.2_beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_beta_release_notes Requires: Mac OSX 10.14 SDKS: iOS: Version 12.2 (build 16E5181e) macOS: Version 10.14.4 (build 18E174e) tvOS: Version 12.2 (build 16L5181e) watchOS: Version 5.2 (build 16T5181e) Compilers: clang: Version 10.0.1 (build 1001.0.37.7) swift: Version 5.0 (build 1001.0.45.7) Checksums: sha1: f3147fa11e20c999f9ba57525e343098fa0fd819 Back to all xcode release list Xcode Release 10.1 (build 10B61) at 2018-10-30 Xcode Version: 10.1 (build 10B61) Release Date: 2018-10-30 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.1/Xcode_10.1.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_release_notes Requires: Mac OSX 10.13.6 SDKS: iOS: Version 12.1 (build 16B91) macOS: Version 10.14.1 (build 18B71) tvOS: Version 12.1 (build 16J602) watchOS: Version 5.1 (build 16R591) Compilers: clang: Version 10.0.0 (build 1000.11.45.5) swift: Version 4.2.1 (build 1000.11.42) Checksums: sha1: 6a6667303750ce9c238da8a4ea76d54eefe2bbc4 Back to all xcode release list Xcode Release 10.1 (build 10O45e) Beta at 2018-10-15 Xcode Version: 10.1 (build 10O45e) Beta Release Date: 2018-10-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.1_Beta_3/Xcode_10.1_Beta_3.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_beta_3_release_notes Requires: Mac OSX 10.13.6 SDKS: iOS: Version 12.1 (build 16B5084a) macOS: Version 10.14.1 (build 18B64a) tvOS: Version 12.1 (build 16J5600a) watchOS: Version 5.1 (build 16R5584a) Compilers: clang: Version 10.0.0 (build 1000.11.45.5) swift: Version 4.2.1 (build 1000.11.42) Checksums: sha1: b9b4fc634fb1c3fff5694cf405100318a284b7a8 Back to all xcode release list Xcode Release 10.1 (build 10O35n) Beta at 2018-10-2 Xcode Version: 10.1 (build 10O35n) Beta Release Date: 2018-10-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.1_Beta_2/Xcode_10.1_Beta_2.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_beta_2_release_notes Requires: Mac OSX 10.13.6 SDKS: iOS: Version 12.1 (build 16B5068g) macOS: Version 10.14.1 (build 18B50b) tvOS: Version 12.1 (build 16J5584c) watchOS: Version 5.1 (build 16R5568d) Compilers: clang: Version 10.0.0 (build 1000.11.45.5) swift: Version 4.2.1 (build 1000.11.42) Checksums: sha1: c448a3a4aba648d32c01b77911c24a708c607b46 Back to all xcode release list Xcode Release 10.1 (build 10O23u) Beta at 2018-9-18 Xcode Version: 10.1 (build 10O23u) Beta Release Date: 2018-9-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10.1_Beta/Xcode_10.1_Beta.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_beta_release_notes Requires: Mac OSX 10.13.6 SDKS: iOS: Version 12.1 (build 16B5059d) macOS: Version 10.14 (build 18A384) tvOS: Version 12.1 (build 16J5575c) watchOS: Version 5.1 (build 16R5559d) Compilers: clang: Version 10.0.0 (build 1000.11.45.5) swift: Version 4.2.1 (build 1000.11.40) Checksums: sha1: 7d5669b730ff9bdb8c4ede1d06b5b07f6c677f12 Back to all xcode release list Xcode Release 10.0 (build 10A255) at 2018-9-17 Xcode Version: 10.0 (build 10A255) Release Date: 2018-9-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10/Xcode_10.xip Release Notes URL: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes Requires: Mac OSX 10.13.6 SDKS: iOS: Version 12.0 (build 16A366) macOS: Version 10.14 (build 18A384) tvOS: Version 12.0 (build 16J364) watchOS: Version 5.0 (build 16R363) Compilers: clang: Version 10.0.0 (build 1000.10.43.1) swift: Version 4.2 (build 1000.11.37.1) Checksums: sha1: 3fdc772883a5208217bfc27282399b333309e976 Back to all xcode release list Xcode Release 10.0 (build 10A254a) at 2018-9-12 Xcode Version: 10.0 (build 10A254a)\n Release Date: 2018-9-12\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_GM_seed/Xcode_10_GM_seed.xip Requires: Mac OSX 10.13.6\n SDKS:\n iOS: Version 12.0 (build 16A366) macOS: Version 10.14 (build 18A384) tvOS: Version 12.0 (build 16J364) watchOS: Version 5.0 (build 16R363) Compilers:\n clang: Version 10.0.0 (build 1000.11.45.2) swift: Version 4.2 (build 1000.11.37.1) Checksums:\n sha1: 18e7222da6be18112df86cfe34a5e2f7a8ca2e5b Back to all xcode release list Xcode Release 10.0 (build 10L232m) Beta at 2018-8-13 Xcode Version: 10.0 (build 10L232m) Beta Release Date: 2018-8-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_Beta_6/Xcode_10_Beta_6.xip Release Notes URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_Beta_6/Xcode_10_Beta_6_Release_Notes.pdf Requires: Mac OSX 10.13.4 SDKS: iOS: Version 12.0 (build 16A5354b) macOS: Version 10.14 (build 18A361a) tvOS: Version 12.0 (build 16J5349a) watchOS: Version 5.0 (build 16R5349a) Compilers: clang: Version 10.0.0 (build 1000.10.43.1) swift: Version 4.2 (build 1000.0.36) Checksums: sha1: 4a9047990882b240b7ed3e3b710d4516c39e129a Back to all xcode release list Xcode Release 10.0 (build 10L221o) Beta at 2018-7-30 Xcode Version: 10.0 (build 10L221o) Beta Release Date: 2018-7-30 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_beta_5/Xcode_10_beta_5.xip Release Notes URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_beta_5/Release_Notes_for_Xcode_10_beta_5.pdf Requires: Mac OSX 10.13.4 SDKS: iOS: Version 12.0 (build 16A5339e) macOS: Version 10.14 (build 18A347e) tvOS: Version 12.0 (build 16J5334d) watchOS: Version 5.0 (build 16R5334e) Compilers: clang: Version 10.0.0 (build 1000.10.40.1) swift: Version 4.2 (build 1000.0.32.1) Checksums: sha1: 618f51edd6ba2f012a995c7df4910a885b9df938 Back to all xcode release list Xcode Release 10.0 (build 10L213o) Beta at 2018-7-17 Xcode Version: 10.0 (build 10L213o) Beta Release Date: 2018-7-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_beta_4/Xcode_10_beta_4.xip Release Notes URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_beta_4/Release_Notes_for_Xcode_10_beta_4.pdf Requires: Mac OSX 10.13.4 SDKS: iOS: Version 12.0 (build 16A5327d) macOS: Version 10.14 (build 18A336d) tvOS: Version 12.0 (build 16J5322d) watchOS: Version 5.0 (build 16R5322d) Compilers: clang: Version 10.0.0 (build 1000.10.40.1) swift: Version 4.2 (build 1000.0.29.2) Checksums: sha1: dabc357c94eca16be9200f8a4c2195d3fe92e853 Back to all xcode release list Xcode Release 10.0 (build 10L201y) Beta at 2018-7-3 Xcode Version: 10.0 (build 10L201y) Beta Release Date: 2018-7-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_beta_3/Xcode_10_beta_3.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_Beta_3/Xcode_10_Beta_3_Release_Notes.pdf Requires: Mac OSX 10.13.4 SDKS: iOS: Version 12.0 (build 16A5318d) macOS: Version 10.14 (build 18A326e) tvOS: Version 12.0 (build 16J5313d) watchOS: Version 5.0 (build 16R5313d) Compilers: clang: Version 10.0.0 (build 1000.10.38) swift: Version 4.2 (build 1000.0.25.1) Checksums: sha1: d748ab7852d6b8234e84c70ee0cf52d65ef3b4b0 Back to all xcode release list Xcode Release 10.0 (build 10L177m) Beta at 2018-6-19 Xcode Version: 10.0 (build 10L177m) Beta Release Date: 2018-6-19 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_Beta_2/Xcode_10_Beta_2.xip Release Notes URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_Beta_2/Xcode_10_Beta_2_Release_Notes.pdf Requires: Mac OSX 10.13.4 SDKS: iOS: Version 12.0 (build 16A5308d) macOS: Version 10.14 (build 18A314f) tvOS: Version 12.0 (build 16J5303d) watchOS: Version 5.0 (build 16R5303d) Compilers: clang: Version 10.0.0 (build 1000.10.25.5) swift: Version 4.2 (build 1000.0.16.9) Checksums: sha1: 83f579a70cef52a030ed9673ddd515ae4b15a82a Back to all xcode release list Xcode Release 10.0 (build 10L176w) Beta at 2018-6-4 Xcode Version: 10.0 (build 10L176w) Beta Release Date: 2018-6-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_10_Beta/Xcode_10_Beta.xip Release Notes URL: https://download.developer.apple.com/Documentation/Beta_Release_Notes_Jun_4_2018/Xcode_10_Beta_Release_Notes.pdf Requires: Mac OSX 10.13.4 SDKS: iOS: Version 12.0 (build 16A5288q) macOS: Version 10.14 (build 18A293s) tvOS: Version 12.0 (build 16J5283n) watchOS: Version 5.0 (build 16R5283q) Compilers: clang: Version 10.0.0 (build 1000.10.25.5) swift: Version 4.2 (build 1000.0.16.7) Checksums: sha1: baf85968300b1d20421e5341976d397f580290d0 Back to all xcode release list Xcode Release 9.4.1 (build 9F2000) at 2018-6-19 Xcode Version: 9.4.1 (build 9F2000) Release Date: 2018-6-19 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip Release Notes URL: https://developer.apple.com/library/archive/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-DontLinkElementID_1 Requires: Mac OSX 10.13.2 SDKS: iOS: Version 11.4 (build 15F79) macOS: Version 10.13.4 (build 17E189) tvOS: Version 11.4 (build 15L576) watchOS: Version 4.3 (build 15T212) Compilers: clang: Version 9.1.0 (build 902.0.39.2) swift: Version 4.1.2 (build 902.0.54) Checksums: sha1: 6236a6d7c9da0449f8c3220d568ae952819f4a3a Back to all xcode release list Xcode Release 9.4 (build 9F1027a) at 2018-5-29 Xcode Version: 9.4 (build 9F1027a) Release Date: 2018-5-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.4/Xcode_9.4.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-DontLinkElementID_1 Requires: Mac OSX 10.13.2 SDKS: iOS: Version 11.4 (build 15F79) macOS: Version 10.13.4 (build 17E189) tvOS: Version 11.4 (build 15L576) watchOS: Version 4.3 (build 15T212) Compilers: clang: Version 9.1.0 (build 902.0.39.2) swift: Version 4.1.2 (build 902.0.54) Checksums: sha1: 17d22ca295922a810ae69b0ae1bab7b1e3304b1d Back to all xcode release list Xcode Release 9.4 (build 9Q1019a) Beta at 2018-5-1 Xcode Version: 9.4 (build 9Q1019a) Beta Release Date: 2018-5-1 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.4_beta_2/Xcode_9.4_beta_2.xip Release Notes URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.4_beta_2/Release_Notes_for_Xcode_9.4_beta_2.pdf Requires: Mac OSX 10.13.2 SDKS: iOS: Version 11.4 (build 15F5061c) macOS: Version 10.13.4 (build 17E189) tvOS: Version 11.4 (build 15L5560b) watchOS: Version 4.3 (build 15T212) Compilers: clang: Version 9.1.0 (build 902.0.39.2) swift: Version 4.1.1 (build 902.0.53) Checksums: sha1: 306fc15deb90228194226d2556c07220ce2d060f Back to all xcode release list Xcode Release 9.4 (build 9Q1004a) Beta at 2018-4-2 Xcode Version: 9.4 (build 9Q1004a) Beta Release Date: 2018-4-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.4_beta/Xcode_9.4_beta.xip Release Notes URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.4_beta/Xcode_9.4_beta_Release_Notes.pdf Requires: Mac OSX 10.13.2 SDKS: iOS: Version 11.4 (build 15F5037c) macOS: Version 10.13.4 (build 17E189) tvOS: Version 11.4 (build 15L5536b) watchOS: Version 4.3 (build 15T212) Compilers: clang: Version 9.1.0 (build 902.0.39.1) swift: Version 4.1.1 (build 902.0.50) Checksums: sha1: 0300e0f756c87cf732c07ddf768dcacf3fa3112b Back to all xcode release list Xcode Release 9.3.1 (build 9E501) at 2018-5-10 Xcode Version: 9.3.1 (build 9E501) Release Date: 2018-5-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.3.1/Xcode_9.3.1.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-DontLinkElementID_1 Requires: Mac OSX 10.13.2 SDKS: iOS: Version 11.3 (build 15E217) macOS: Version 10.13.4 (build 17E189) tvOS: Version 11.3 (build 15L211) watchOS: Version 4.3 (build 15T212) Compilers: clang: Version 9.1.0 (build 902.0.39.1) swift: Version 4.1 (build 902.0.48902.0.48) Checksums: sha1: f10bf92c8dfb0dda451688d0335bab0d1cea2ce7 Back to all xcode release list Xcode Release 9.3 (build 9E145) at 2018-3-29 Xcode Version: 9.3 (build 9E145) Release Date: 2018-3-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.3/Xcode_9.3.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-DontLinkElementID_1 Requires: Mac OSX 10.13.2 SDKS: iOS: Version 11.3 (build 15E217) macOS: Version 10.13.4 (build 17E189) tvOS: Version 11.3 (build 15L211) watchOS: Version 4.3 (build 15T212) Compilers: clang: Version 9.1.0 (build 902.0.39.1) swift: Version 4.1 (build 902.0.48) Checksums: sha1: 8c054e8b318b9d567177a8c2e230a9a6c7a603a6 Back to all xcode release list Xcode Release 9.3 (build 9Q127n) Beta at 2018-3-5 Xcode Version: 9.3 (build 9Q127n) Beta\n Release Date: 2018-3-5\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.3_beta_4/Xcode_9.3_beta_4.xip Requires: Mac OSX 10.13.2\n SDKS:\n iOS: Version (build 15E5201e) macOS: Version (build 17E170c) tvOS: Version (build 15L5198d) watchOS: Version (build 15T5199e) Compilers:\n clang: Version 9.1.0 (build 902.0.37.1) swift: Version 4.1 (build 902.0.43) Checksums:\n sha1: cb213d2a7164c62ee312d9f6aa89e5b1e7e5630d Back to all xcode release list Xcode Release 9.3 (build 9Q117m) Beta at 2018-2-20 Xcode Version: 9.3 (build 9Q117m) Beta\n Release Date: 2018-2-20\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.3_beta_3/Xcode_9.3_beta_3.xip Requires: Mac OSX 10.13.2\n SDKS:\n iOS: Version (build 15E5189d) macOS: Version (build 17E160d) tvOS: Version (build 15L5186d) watchOS: Version (build 15T5187d) Compilers:\n clang: Version 9.1.0 (build 902.0.34) swift: Version 4.1 (build 902.0.41) Checksums:\n sha1: d23f0dc8a589b3bd6e224784f44aa441d81f1872 Back to all xcode release list Xcode Release 9.3 (build 9Q107o) Beta at 2018-2-6 Xcode Version: 9.3 (build 9Q107o) Beta\n Release Date: 2018-2-6\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.3_beta_2/Xcode_9.3_beta_2.xip Requires: Mac OSX 10.13.2\n SDKS:\n iOS: Version (build 15E5178d) macOS: Version (build 17E150d) tvOS: Version (build 15L5175d) watchOS: Version (build 15T5176c) Compilers:\n clang: Version 9.1.0 (build 902.0.31) swift: Version 4.1 (build 902.0.38) Checksums:\n sha1: 953d43c6009f73a1893e0688d36fdf6407d16ee6 Back to all xcode release list Xcode Release 9.3 (build 9Q98q) Beta at 2018-1-24 Xcode Version: 9.3 (build 9Q98q) Beta\n Release Date: 2018-1-24\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.3_beta/Xcode_9.3_beta.xip Requires: Mac OSX 10.13.2\n SDKS:\n iOS: Version (build 15E5167d) macOS: Version (build 17E139g) tvOS: Version (build 15L5164c) watchOS: Version (build 15T5165c) Compilers:\n clang: Version 9.1.0 (build 902.0.30) swift: Version 4.1 (build 902.0.34) Checksums:\n sha1: 3d1f4918810b173ff205b64a2006bb163d9cf5b1 Back to all xcode release list Xcode Release 9.2 (build 9C40b) at 2017-12-4 Xcode Version: 9.2 (build 9C40b) Release Date: 2017-12-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.2/Xcode_9.2.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW936 Requires: Mac OSX 10.12.6 SDKS: iOS: Version (build 15C107) macOS: Version (build 17C76) tvOS: Version (build 15K104) watchOS: Version (build 15S100) Compilers: clang: Version 9.0.0 (build 900.0.39.2) swift: Version 4.0.3 (build 900.0.74.1) Checksums: sha1: cd93fc78fbbb34e135a4c4f0121f9fe559260399 Back to all xcode release list Xcode Release 9.2 (build 9C34b) Beta at 2017-11-6 Xcode Version: 9.2 (build 9C34b) Beta\n Release Date: 2017-11-6\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.2_Beta_2/Xcode_9.2_Beta_2.xip Requires: Mac OSX 10.12.6\n SDKS:\n iOS: Version (build 15C5097c) macOS: Version (build 17C67a) tvOS: Version (build 15K5090c) watchOS: Version (build 15S5090c) Compilers:\n clang: Version 9.0.0 (build 900.0.39) swift: Version 4.0.3 (build 900.0.72) Checksums:\n sha1: 405894ed89e08566955ffba2faf37a0bfbd6c3c0 Back to all xcode release list Xcode Release 9.2 (build 9C32c) Beta at 2017-10-31 Xcode Version: 9.2 (build 9C32c) Beta\n Release Date: 2017-10-31\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.2_Beta/Xcode_9.2_Beta.xip Requires: Mac OSX 10.12.6\n SDKS:\n iOS: Version (build 15C5092b) macOS: Version (build 17C60c) tvOS: Version (build 15K5085b) watchOS: Version (build 15S5085b) Compilers:\n clang: Version 9.0.0 (build 900.0.39) swift: Version 4.0.3 (build 900.0.71) Checksums:\n sha1: 22b1a95b67ea688781a8c128bb047cc3f8d954b1 Back to all xcode release list Xcode Release 9.1 (build 9B55) at 2017-10-31 Xcode Version: 9.1 (build 9B55) Release Date: 2017-10-31 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.1/Xcode_9.1.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW881 Requires: Mac OSX 10.12.6 SDKS: iOS: Version (build 15B87) macOS: Version (build 17B41) tvOS: Version (build 15J580) watchOS: Version (build 15R844) Compilers: clang: Version 9.0.0 (build 900.0.38) swift: Version 4.0.2 (build 900.0.69.2) Checksums: sha1: 3bfa10edf51e461cfb0459d2a2bdd2228dc9ff70 Back to all xcode release list Xcode Release 9.0.1 (build 9A1004) at 2017-10-15 Xcode Version: 9.0.1 (build 9A1004) Release Date: 2017-10-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.0.1/Xcode_9.0.1.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW922 Requires: Mac OSX 10.12.6 SDKS: iOS: Version (build 15A372) macOS: Version (build 17A360) tvOS: Version (build 15J380) watchOS: Version (build 15R372) Compilers: clang: Version 9.0.0 (build 900.0.38) swift: Version 4.0 (build 900.0.65.2) Checksums: sha1: fe80d3396ff6b91659b4b7888893101dae5b1ad9 Back to all xcode release list Xcode Release 9.1 (build 9B46) Beta at 2017-10-9 Xcode Version: 9.1 (build 9B46) Beta\n Release Date: 2017-10-9\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.1_beta_2/Xcode_9.1_beta2.xip Requires: Mac OSX 10.12.6\n SDKS:\n iOS: Version (build 15B5078b) macOS: Version (build 17B35a) tvOS: Version (build 15J5571b) watchOS: Version (build 15R5835b) Compilers:\n clang: Version 9.0.0 (build 900.0.38) swift: Version 4.0.1 (build 900.0.68) Checksums:\n sha1: d3dc799afac2f7b70ff0beb96dfeaddd044bbf92 Back to all xcode release list Xcode Release 9.1 (build 9B37) Beta at 2017-9-27 Xcode Version: 9.1 (build 9B37) Beta\n Release Date: 2017-9-27\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9.1_beta/Xcode_9.1_beta.xip Requires: Mac OSX 10.12.6\n SDKS:\n iOS: Version (build 15B5066e) macOS: Version (build 17A360) tvOS: Version (build 15J5559d) watchOS: Version (build 15R5823b) Compilers:\n clang: Version 9.0.0 (build 900.0.38) swift: Version 4.0.1 (build 900.0.66) Checksums:\n sha1: 2d282eac5bbef51683fc857311ef900e8ca1fcf4 Back to all xcode release list Xcode Release 9.0 (build 9A235) at 2017-9-12 Xcode Version: 9.0 (build 9A235) Release Date: 2017-9-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_9/Xcode_9.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW878 Requires: Mac OSX 10.12.6 SDKS: iOS: Version (build 15A372) macOS: Version (build 17A360) tvOS: Version (build 15J380) watchOS: Version (build 15R372) Compilers: clang: Version 9.0.0 (build 900.0.37) swift: Version 4.0 (build 900.0.65) Checksums: sha1: d934fa6304d3aa890b02c3998e139be5a355469d Back to all xcode release list Xcode Release 8.3.3 (build 8E3004b) at 2017-6-5 Xcode Version: 8.3.3 (build 8E3004b) Release Date: 2017-6-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8.3.3/Xcode_8.3.3.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW870 Requires: Mac OSX 10.12 SDKS: iOS: Version (build 14E8301) macOS: Version (build 16E185) tvOS: Version (build 14W260) watchOS: Version (build 14V243) Compilers: clang: Version 8.1.0 (build 802.0.42) swift: Version 3.1 (build 802.0.53) Checksums: sha1: 67023787df49c91ff5d6a67e12d165bc610f0022 Back to all xcode release list Xcode Release 8.3.2 (build 8E2002) at 2017-4-18 Xcode Version: 8.3.2 (build 8E2002) Release Date: 2017-4-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8.3.2/Xcode_8.3.2.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW853 Requires: Mac OSX 10.12 SDKS: iOS: Version (build 14E269) macOS: Version (build 16E185) tvOS: Version (build 14W260) watchOS: Version (build 14V243) Compilers: clang: Version 8.1.0 (build 802.0.42) swift: Version 3.1 (build 802.0.53) Checksums: sha1: 4e7e97e6e2c5c92432a04e657dfe94226849cb51 Back to all xcode release list Xcode Release 8.3.1 (build 8E1000a) at 2017-4-6 Xcode Version: 8.3.1 (build 8E1000a) Release Date: 2017-4-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8.3.1/Xcode_8.3.1.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW848 Requires: Mac OSX 10.12 SDKS: iOS: Version (build 14E269) macOS: Version (build 16E185) tvOS: Version (build 14W260) watchOS: Version (build 14V243) Compilers: clang: Version 8.1.0 (build 802.0.41) swift: Version 3.1 (build 802.0.51) Checksums: sha1: 320e0c26daec62ef2fbc67bac26642fc6f2b0a90 Back to all xcode release list Xcode Release 8.3 (build 8E162) at 2017-3-27 Xcode Version: 8.3 (build 8E162) Release Date: 2017-3-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8.3/Xcode_8.3.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW160 Requires: Mac OSX 10.12 SDKS: iOS: Version (build 14E269) macOS: Version (build 16E185) tvOS: Version (build 14W260) watchOS: Version (build 14V243) Compilers: clang: Version 8.1.0 (build 802.0.38) swift: Version 3.1 (build 802.0.48) Checksums: sha1: a6a6bad2206d56fbd04b38c17429ca032825147b Back to all xcode release list Xcode Release 8.2.1 (build 8C1002) at 2016-12-19 Xcode Version: 8.2.1 (build 8C1002) Release Date: 2016-12-19 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8.2.1/Xcode_8.2.1.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW157 Requires: Mac OSX 10.11.5 SDKS: iOS: Version (build 14C89) macOS: Version (build 16C58) tvOS: Version (build 14U591) watchOS: Version (build 14S471a) Compilers: clang: Version 8.0.0 (build 800.0.42.1) llvm: Version 3.9.0 (build ) swift: Version 3.0.2 (build 800.0.63) Checksums: sha1: 84c69fcf79bc65388dbea75161b88d9984acea1f Back to all xcode release list Xcode Release 8.2 (build 8C38) at 2016-12-12 Xcode Version: 8.2 (build 8C38) Release Date: 2016-12-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8.2/Xcode_8.2.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW9 Requires: Mac OSX 10.11.5 SDKS: iOS: Version (build 14C89) macOS: Version (build 16C58) tvOS: Version (build 14U591) watchOS: Version (build 14S471a) Compilers: clang: Version 8.0.0 (build 800.0.42.1) llvm: Version 3.9.0 (build ) swift: Version 3.0.2 (build 800.0.63) Checksums: sha1: e2d13308b544bf2ee6d6f8212cccbf29513d3ef1 Back to all xcode release list Xcode Release 8.1 (build 8B62) at 2016-10-27 Xcode Version: 8.1 (build 8B62) Release Date: 2016-10-27 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8.1/Xcode_8.1.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW24 Requires: Mac OSX 10.11.5 SDKS: iOS: Version (build 14B72) macOS: Version (build 16B2649) tvOS: Version (build 14T328) watchOS: Version (build 14S471a) Compilers: clang: Version 8.0.0 (build 800.0.42.1) llvm: Version 3.9.0 (build ) swift: Version 3.0.1 (build 800.0.58.6) Checksums: sha1: 6c084896634167054685874871aeda2b41f0a621 Back to all xcode release list Xcode Release 8.0 (build 8A218a) at 2016-9-13 Xcode Version: 8.0 (build 8A218a) Release Date: 2016-9-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_8/Xcode_8.xip Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW78 Requires: Mac OSX 10.11.5 SDKS: iOS: Version (build 14A345) macOS: Version (build 16A300) tvOS: Version (build 14T328) watchOS: Version (build 14S326) Compilers: clang: Version 8.0.0 (build 800.0.38) llvm: Version 3.9.0 (build ) swift: Version 3.0 (build 800.0.46.2) Checksums: sha1: 57c57b5913bf6d12844e404a82e6d5deae1c6453 Back to all xcode release list Xcode Release 7.3.1 (build 7D1014) at 2016-5-3 Xcode Version: 7.3.1 (build 7D1014) Release Date: 2016-5-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW217 Requires: Mac OSX 10.11 SDKS: iOS: Version (build 13E230) macOS: Version (build 15E60) tvOS: Version (build 13Y227) watchOS: Version (build 13V143) Compilers: clang: Version 7.3.0 (build 703.0.31) llvm: Version 3.8.0 (build ) swift: Version 2.2 (build 703.0.18.8) Checksums: sha1: 3016654b6f3574b937cbb5f7dd11c98bd3ab7b4e Back to all xcode release list Xcode Release 7.3 (build 7D175) at 2016-3-21 Xcode Version: 7.3 (build 7D175) Release Date: 2016-3-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7.3/Xcode_7.3.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW233 Requires: Mac OSX 10.11 SDKS: iOS: Version (build 13E230) macOS: Version (build 15E60) tvOS: Version (build 13Y227) watchOS: Version (build 13V143) Compilers: clang: Version 7.3.0 (build 703.0.29) llvm: Version 3.8.0 (build ) swift: Version 2.2 (build 703.0.18.1) Checksums: sha1: 2a9ad88e2144022fc81cdc1976e79b3d35a235b8 Back to all xcode release list Xcode Release 7.2.1 (build 7C1002) at 2016-2-2 Xcode Version: 7.2.1 (build 7C1002) Release Date: 2016-2-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7.2.1/Xcode_7.2.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW264 Requires: Mac OSX 10.10.5 SDKS: iOS: Version (build 13C75) macOS: Version (build 15C43) tvOS: Version (build 13U79) watchOS: Version (build 13S660) Compilers: clang: Version 7.0.2 (build 700.1.81) llvm: Version 3.7.0 (build ) swift: Version 2.1.1 (build 700.1.101.15) Checksums: sha1: afebf0fb8f537948c04b0439cab0cc93136f158c Back to all xcode release list Xcode Release 7.2 (build 7C68) at 2015-12-8 Xcode Version: 7.2 (build 7C68) Release Date: 2015-12-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7.2/Xcode_7.2.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW270 Requires: Mac OSX 10.10.5 SDKS: iOS: Version (build 13C75) macOS: Version (build 15C43) tvOS: Version (build 13U78) watchOS: Version (build 13S660) Compilers: clang: Version 7.0.2 (build 700.1.81) llvm: Version 3.7.0 (build ) swift: Version 2.1.1 (build 700.1.101.15) Checksums: sha1: df227623ba15036c0684e3c1edb0ee034b8ef692 Back to all xcode release list Xcode Release 7.1.1 (build 7B1005) at 2015-11-5 Xcode Version: 7.1.1 (build 7B1005) Release Date: 2015-11-5 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7.1.1/Xcode_7.1.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW291 Requires: Mac OSX 10.10.5 SDKS: iOS: Version (build 13B137) macOS: Version (build 15A278) tvOS: Version (build 13T393) watchOS: Version (build 13S343) Checksums: sha1: 33163b3cbff846224a2661c08ef8e737f0da0762 Back to all xcode release list Xcode Release 7.1 (build 7B91b) at 2015-10-21 Xcode Version: 7.1 (build 7B91b) Release Date: 2015-10-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7.1/Xcode_7.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW300 Requires: Mac OSX 10.10.5 SDKS: iOS: Version (build 13B137) macOS: Version (build 15A278) tvOS: Version (build 13T393) watchOS: Version (build 13S343) Compilers: clang: Version 7.0.0 (build 700.1.76) llvm: Version 3.7.0 (build ) swift: Version 2.1 (build 700.1.101.6) Checksums: sha1: d4e9b9e8e33eb2cc7793143761404fbb650090d4 Back to all xcode release list Xcode Release 7.0.1 (build 7A1001) at 2015-9-28 Xcode Version: 7.0.1 (build 7A1001) Release Date: 2015-9-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7.0.1/Xcode_7.0.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW324 Requires: Mac OSX 10.10.3 SDKS: iOS: Version (build 13A340) macOS: Version (build 15A278) watchOS: Version (build 13S343) Compilers: clang: Version 7.0.0 (build 700.0.72) llvm: Version 3.7.0 (build ) swift: Version 2.0 (build 700.0.59) Checksums: sha1: f750bd86359383a77d4b57714b05e6725eaec76c Back to all xcode release list Xcode Release 7.0 (build 7A220) at 2015-9-16 Xcode Version: 7.0 (build 7A220) Release Date: 2015-9-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_7/Xcode_7.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW326 Requires: Mac OSX 10.10.3 SDKS: iOS: Version (build 13A340) macOS: Version (build 15A278) watchOS: Version (build 13S343) Compilers: clang: Version 7.0.0 (build 700.0.72) llvm: Version 3.7.0 (build ) swift: Version 2.0 (build 700.0.59) Checksums: sha1: 4afc067e5fc9266413c157167a123c8cdfdfb15e Back to all xcode release list Xcode Release 6.4 (build 6E35b) at 2015-6-30 Xcode Version: 6.4 (build 6E35b) Release Date: 2015-6-30 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_6.4/Xcode_6.4.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW364 Requires: Mac OSX 10.10 SDKS: iOS: Version (build 12H141) macOS: Version (build 13F34) Compilers: clang: Version 6.1.0 (build 602.0.53) llvm: Version 3.6.0 (build ) swift: Version 1.2 (build 602.0.53.1) Checksums: sha1: 672e3dcb7727fc6db071e5a8528b70aa03900bb0 Back to all xcode release list Xcode Release 6.3.2 (build 6D2105) at 2015-5-18 Xcode Version: 6.3.2 (build 6D2105) Release Date: 2015-5-18 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_6.3.2/Xcode_6.3.2.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW368 Requires: Mac OSX 10.10 SDKS: iOS: Version (build 12F69) macOS: Version (build 13F34) Compilers: clang: Version 6.1.0 (build 602.0.53) llvm: Version 3.6.0 (build ) swift: Version 1.2 (build 602.0.53.1) Checksums: sha1: f6a909c476eb154f0138a4b5d91843ade8b18b90 Back to all xcode release list Xcode Release 6.3.1 (build 6D1002) at 2015-4-21 Xcode Version: 6.3.1 (build 6D1002) Release Date: 2015-4-21 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_6.3.1/Xcode_6.3.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW370 Requires: Mac OSX 10.10 SDKS: iOS: Version (build 12F69) macOS: Version (build 13F34) Compilers: clang: Version 6.1.0 (build 602.0.49) llvm: Version 3.6.0 (build ) swift: Version 1.2 (build 602.0.49.6) Checksums: sha1: dc0725b13bac25d576302667259f0b0f038c471a Back to all xcode release list Xcode Release 6.3 (build 6D570) at 2015-4-8 Xcode Version: 6.3 (build 6D570) Release Date: 2015-4-8 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_6.3/Xcode_6.3.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW378 Requires: Mac OSX 10.10 SDKS: iOS: Version (build 12F69) macOS: Version (build 13F34) Compilers: clang: Version 6.1.0 (build 602.0.49) llvm: Version 3.6.0 (build ) swift: Version 1.2 (build 602.0.49.3) Checksums: sha1: fb17a4c95d15c086cb870ef42dcd06f3a8d19596 Back to all xcode release list Xcode Release 6.2 (build 6C131e) at 2015-3-9 Xcode Version: 6.2 (build 6C131e) Release Date: 2015-3-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/Xcode_6.2/Xcode_6.2.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW412 Requires: Mac OSX 10.9.4 SDKS: iOS: Version (build 12D508) macOS: Version (build 13F26) Compilers: clang: Version 6.0 (build 600.0.57) llvm: Version 3.5 (build ) swift: Version 1.1 (build 600.0.57.4) Checksums: sha1: 01944eb7ad415c95e2b24e18c10da5b3555b6c7f Back to all xcode release list Xcode Release 6.1.1 (build 6A2008a) at 2014-12-2 Xcode Version: 6.1.1 (build 6A2008a) Release Date: 2014-12-2 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_6.1.1/xcode_6.1.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW423 Requires: Mac OSX 10.9.4 SDKS: iOS: Version (build 12A365) macOS: Version (build 13F26) Compilers: clang: Version 6.0 (build 600.0.56) llvm: Version 3.5 (build ) swift: Version 1.1 (build 600.0.56.1) Checksums: sha1: a54e4b327889e3ee3c952ef5292adc076c21df02 Back to all xcode release list Xcode Release 6.1 (build 6A1052d) at 2014-10-20 Xcode Version: 6.1 (build 6A1052d) Release Date: 2014-10-20 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_6.1/56841_xcode_6.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW432 Requires: Mac OSX 10.9.4 Compilers: clang: Version 6.0 (build 600.0.54) llvm: Version 3.5 (build ) swift: Version 1.1 (build 600.0.54.20) Checksums: sha1: 4fc070a1347cc880ab2ed2225a7c9e4d5d6515c0 Back to all xcode release list Xcode Release 6.0.1 (build 6A317) at 2014-9-17 Xcode Version: 6.0.1 (build 6A317) Release Date: 2014-9-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_6.0.1/xcode_6.0.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW450 Requires: Mac OSX 10.9.4 SDKS: iOS: Version (build 12A365) macOS: Version (build 13F26) Compilers: clang: Version 6.0 (build 600.0.51) llvm: Version 3.5 (build ) swift: Version 1.0 (build 600.0.51.4) Checksums: sha1: 496d56181861dd7ed1807895897d45403eb4ed44 Back to all xcode release list Xcode Release 6.0 (build 6A313) at 2014-9-9 Xcode Version: 6.0 (build 6A313)\n Release Date: 2014-9-9\n Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW453 Requires: Mac OSX 10.9.4\n Xcode Release 5.1.1 (build 5B1008) at 2014-4-10 Xcode Version: 5.1.1 (build 5B1008) Release Date: 2014-4-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_5.1.1/xcode_5.1.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW504 Requires: Mac OSX 10.8 Compilers: clang: Version 5.1 (build 503.0.40) llvm: Version 3.4 (build ) Checksums: sha1: e4bb45174324c3a4b7c66fa1db1083ccbbe2334e Back to all xcode release list Xcode Release 5.1 (build 5B130a) at 2014-3-10 Xcode Version: 5.1 (build 5B130a) Release Date: 2014-3-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_5.1/xcode_5.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW512 Requires: Mac OSX 10.8 Compilers: clang: Version 5.1 (build 503.0.38) llvm: Version 3.4 (build ) Checksums: sha1: 7ee6f5917078f1fd509e539f1bde85d85ec23b20 Back to all xcode release list Xcode Release 5.0.2 (build 5A3005a) at 2013-11-11 Xcode Version: 5.0.2 (build 5A3005a) Release Date: 2013-11-11 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_5.0.2/xcode_5.0.2.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW536 Requires: Mac OSX 10.8 Compilers: clang: Version 5.0 (build 500.2.79) llvm: Version 3.3 (build ) Checksums: sha1: de23e3f4644dbb434ed862a3ce002e2de555f6f2 Back to all xcode release list Xcode Release 5.0.1 (build 5A2053) at 2013-10-22 Xcode Version: 5.0.1 (build 5A2053) Release Date: 2013-10-22 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_5.0.1/xcode_5.0.1.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW544 Requires: Mac OSX 10.8 Compilers: clang: Version 5.0 (build 500.2.79) llvm: Version 3.3 (build ) Checksums: sha1: 8d24b0ee4761ea4135a58c1dd915fce81360e1e7 Back to all xcode release list Xcode Release 5.0 (build 5A1413) at 2013-9-16 Xcode Version: 5.0 (build 5A1413) Release Date: 2013-9-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_5/xcode_5.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW578 Requires: Mac OSX 10.8 Compilers: clang: Version 5.0 (build 500.2.75) llvm: Version 3.3 (build ) Checksums: sha1: 991ea0361c13f92d6cd7e31644dcdc1f329ffe03 Back to all xcode release list Xcode Release 4.6.3 (build 4H1503) at 2013-6-12 Xcode Version: 4.6.3 (build 4H1503) Release Date: 2013-6-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW600 Requires: Mac OSX 10.7 SDKS: iOS: Version (build 10B141) macOS: Version (build 11E52) Compilers: clang: Version 4.1 (build 425.0.28) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: f8f9d8a3eec9c46072c02e0007f6abe411e674f8 Back to all xcode release list Xcode Release 4.6.2 (build 4H1003) at 2013-4-15 Xcode Version: 4.6.2 (build 4H1003) Release Date: 2013-4-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.6.2/xcode4620419895a.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW603 Requires: Mac OSX 10.7 SDKS: iOS: Version (build 10B141) macOS: Version (build 11E52) Compilers: clang: Version 4.1 (build 425.0.28) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: 5b1918ac6173f6444196cf497a419d79970608c2 Back to all xcode release list Xcode Release 4.6.1 (build 4H512) at 2013-3-14 Xcode Version: 4.6.1 (build 4H512) Release Date: 2013-3-14 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.6.1/xcode4610419628a.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW612 Requires: Mac OSX 10.7 SDKS: iOS: Version (build 10B141) macOS: Version (build 11E52) Compilers: clang: Version 4.1 (build 425.0.27) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: a3bde15a30da0faba2080fb91ef65cdf7956a1ed Back to all xcode release list Xcode Release 4.6 (build 4H127) at 2013-1-28 Xcode Version: 4.6 (build 4H127) Release Date: 2013-1-28 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.6/xcode460417218a.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.6/release_notes_xcode46gm.pdf Requires: Mac OSX 10.7 SDKS: iOS: Version (build 10B141) macOS: Version (build 11E52) Compilers: clang: Version 4.1 (build 425.0.24) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: e677cd170fd5090ea0670bb31cb2023b58a9d323 Back to all xcode release list Xcode Release 4.5.2 (build 4G2008a) at 2012-11-1 Xcode Version: 4.5.2 (build 4G2008a) Release Date: 2012-11-1 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.5.2/xcode4520418508a.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.5.2/release_notes_xcode_4.5.2.pdf Requires: Mac OSX 10.7 SDKS: iOS: Version (build 10A403) macOS: Version (build 11E52) Compilers: clang: Version 4.1 (build 421.11.66) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: 2dea0b49f9f35b91ad2abc7f3b71889679febac1 Back to all xcode release list Xcode Release 4.5.1 (build 4G1004) at 2012-10-3 Xcode Version: 4.5.1 (build 4G1004) Release Date: 2012-10-3 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.5.1/xcode4510417539a.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.5.1/release_notes_xcode_4.5.1.pdf Requires: Mac OSX 10.7 SDKS: iOS: Version (build 10A403) macOS: Version (build 11E52) Compilers: clang: Version 4.1 (build 421.11.66) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: 1a9e80e73f23ca0b6da961c0b691f1a94fe7e348 Back to all xcode release list Xcode Release 4.5 (build 4G182) at 2012-9-19 Xcode Version: 4.5 (build 4G182) Release Date: 2012-9-19 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.5/xcode_4.5.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW643 Requires: Mac OSX 10.7 SDKS: iOS: Version (build 10A403) macOS: Version (build 11E52) Compilers: clang: Version 4.1 (build 421.11.65) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: e461491c9251bb955ce60e2f7d7dfbc5f934321d Back to all xcode release list Xcode Release 4.4.1 (build 4F1003) at 2012-8-7 Xcode Version: 4.4.1 (build 4F1003) Release Date: 2012-8-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.4.1/xcode_4.4.1_6938145.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW670 Requires: Mac OSX 10.7 SDKS: iOS: Version (build 9B176) macOS: Version (build 11E52) Compilers: clang: Version 4.0 (build 421.0.60) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: 4b8e927c7c58885fe91a36a21952604285b8d60f Back to all xcode release list Xcode Release 4.3.3 (build 4E3002) at 2012-6-7 Xcode Version: 4.3.3 (build 4E3002)\n Release Date: 2012-6-7\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.3.3_for_lion/xcode_4.3.3_for_lion.dmg Requires: Mac OSX 10.7\n Compilers:\n clang: Version 3.1 (build 318.0.61) llvm: Version (build 2336.9.00) llvm_gcc: Version 4.2 (build 5658) Checksums:\n sha1: d806ca8937b43a22d2f4e7c9ad8cc06e2a7298d8 Back to all xcode release list Xcode Release 4.3.2 (build 4E2002) at 2012-3-21 Xcode Version: 4.3.2 (build 4E2002)\n Release Date: 2012-3-21\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.3.2/xcode_432_lion.dmg Requires: Mac OSX 10.7\n SDKS:\n iOS: Version (build 9B176) Compilers:\n clang: Version 3.1 (build 318.0.58) llvm: Version (build 2336.9.00) llvm_gcc: Version 4.2 (build 5658) Checksums:\n sha1: 8e2723f24f2a58af78317c115e1dc8e4f3c96b43 Back to all xcode release list Xcode Release 4.4 (build 4F134) at 2012-3-15 Xcode Version: 4.4 (build 4F134) Release Date: 2012-3-15 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.4_21362/xcode446938108a.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.4_21362/release_notes_xcode44gm.pdf Requires: Mac OSX 10.7 SDKS: iOS: Version (build 9B174) Compilers: clang: Version 4.0 (build 421.0.57) llvm: Version (build 2336.11.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: d04393543564f85c2f4d82e507d596d3070e9aba Back to all xcode release list Xcode Release 4.3.1 (build 4E1019) at 2012-3-5 Xcode Version: 4.3.1 (build 4E1019)\n Release Date: 2012-3-5\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.3.1_for_lion_21267/xcode_431_lion.dmg Requires: Mac OSX 10.7\n SDKS:\n iOS: Version (build 9B176) Compilers:\n clang: Version 3.1 (build 318.0.54) llvm: Version (build 2336.9.00) llvm_gcc: Version 4.2 (build 5658) Checksums:\n sha1: 82d89d4029665cca28d806361e4607d9875ac9a4 Back to all xcode release list Xcode Release 4.3 (build 4E109) at 2012-2-12 Xcode Version: 4.3 (build 4E109) Release Date: 2012-2-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.3_for_lion_21266/xcode_43_lion.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW699 Requires: Mac OSX 10.7 SDKS: iOS: Version (build 9A334) Compilers: clang: Version 3.1 (build 318.0.45) llvm: Version (build 2336.9.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: be666d0285f492463ae4c189d265612a83cbf296 Back to all xcode release list Xcode Release 4.2.1 (build 4D502) at 2011-11-17 Xcode Version: 4.2.1 (build 4D502)\n Release Date: 2011-11-17\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.2.1_for_lion_21265/installxcode_421_lion.dmg Requires: Mac OSX 10.7\n SDKS:\n iOS: Version (build 9A334) Checksums:\n sha1: 2f800aadc6b51092e0375d34ac45702bcef59f5c Back to all xcode release list Xcode Release 4.2 (build 4D199) at 2011-10-12 Xcode Version: 4.2 (build 4D199) Release Date: 2011-10-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.2_for_lion_21264/installxcode_42_lion.dmg Release Notes URL: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW713 Requires: Mac OSX 10.7 SDKS: iOS: Version (build 9A334) Compilers: clang: Version 3.0 (build 211.10.1) llvm: Version (build 2336.1.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: de748f5d096c55666b3ac22ee6fbe0e512206b36 Back to all xcode release list Xcode Release 4.2 (build 4C199) at 2011-10-12 Xcode Version: 4.2 (build 4C199) Release Date: 2011-10-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.2_for_snow_leopard/xcode_4.2_for_snow_leopard.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.2_for_snow_leopard/xcode_4.2_for_snow_leopard_readme.pdf Requires: Mac OSX 10.6.8 SDKS: iOS: Version (build 9A334) Compilers: clang: Version 3.0 (build 211.10.1) llvm: Version (build 2336.1.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: e65c19531be855c359eaad3f00a915213ecf2d41 Back to all xcode release list Xcode Release 4.1 (build 4B110f) at 2011-8-29 Xcode Version: 4.1 (build 4B110f) Release Date: 2011-8-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.1_for_snow_leopard_21110/xcode_4.1_for_snow_leopard.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.1_for_snow_leopard_21110/xcode_4.1_for_snow_leopard_readme.pdf Requires: Mac OSX 10.6.8 Compilers: clang: Version 2.1 (build 163.7.1) gcc: Version 4.2 (build 5666) llvm: Version (build 2335.15.00) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: 5f55b5b906d9f7eeac842d63bd233a5c4021bfde Back to all xcode release list Xcode Release 4.1 (build 4B110i) at 2011-7-20 Xcode Version: 4.1 (build 4B110i)\n Release Date: 2011-7-20\n Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.1_for_lion_21263/installxcode_41_lion.dmg Requires: Mac OSX 10.7\n Compilers:\n clang: Version 2.1 (build 163.7.1) gcc: Version 4.2 (build 5666) llvm: Version (build 2335.15.00) llvm_gcc: Version 4.2 (build 5658) Checksums:\n sha1: 7ccb636d51d54e88c2d27be55cbff107d5be96a0 Back to all xcode release list Xcode Release 4.0.2 (build 4A2002a) at 2011-4-12 Xcode Version: 4.0.2 (build 4A2002a) Release Date: 2011-4-12 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.0.2_and_ios_sdk_4.3/xcode_4.0.2_and_ios_sdk_4.3.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.0.2_and_ios_sdk_4.3/final_xcode_4.0.2_readme.pdf Requires: Mac OSX 10.6.8 Compilers: clang: Version 2.0 (build 137) gcc: Version 4.0 (build 5494) llvm: Version (build 2335.9) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: 684265b6310566c5b0080b1a47e5ddc2c680c929 Back to all xcode release list Xcode Release 4.0.1 (build 4A1006) at 2011-3-23 Xcode Version: 4.0.1 (build 4A1006) Release Date: 2011-3-23 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4.0.1_and_ios_sdk_4.3/xcode_4.0.1_and_ios_sdk_4.3.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4.0.1_and_ios_sdk_4.3/xcode_4.0.1_readme.pdf Requires: Mac OSX 10.6.8 Checksums: sha1: 669258ed23e71482bc9e99f4bece6ac31f41dd38 Back to all xcode release list Xcode Release 4.0 (build 4A304a) at 2011-3-9 Xcode Version: 4.0 (build 4A304a) Release Date: 2011-3-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_and_ios_sdk_4.3__final.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_rn.pdf Requires: Mac OSX 10.6.8 Compilers: clang: Version 2.0 (build 137) gcc: Version 4.0 (build 5494) llvm: Version (build 2335.9) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: dd1b609fee9467d799e42d7ad7a2eb3838e35356 Back to all xcode release list Xcode Release 3.2.6 (build 10M25xx) at 2011-3-6 Xcode Version: 3.2.6 (build 10M25xx) Release Date: 2011-3-6 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3_and_ios_sdk_4.3_readme.pdf Requires: Mac OSX 10.6.4 SDKS: iOS: Version 4.3 (build ) Compilers: clang: Version 1.7 (build 77) gcc: Version 4.0 (build 5494) llvm: Version (build 2335.6) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: a63e76e32f1c3d201321165e8361ad0400f39f7d Back to all xcode release list Xcode Release 3.2.5 (build 10M2423) at 2010-11-18 Xcode Version: 3.2.5 (build 10M2423) Release Date: 2010-11-18 Direct Download URL: https://download.developer.apple.com/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg Release Notes URL: https://download.developer.apple.com/ios/ios_sdk_4.2__final/readme_xcode_3.2.5_and_ios_4.2.pdf Requires: Mac OSX 10.6.4 SDKS: iOS: Version 4.2 (build ) Compilers: clang: Version 1.6 (build 70) gcc: Version 4.0 (build 5494) llvm: Version (build 2333.4) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: ff0b976cc991264dc0df571d01881cd39e112c1f Back to all xcode release list Xcode Release 3.2.4 (build 10M2309) at 2010-9-6 Xcode Version: 3.2.4 (build 10M2309) Release Date: 2010-9-6 Direct Download URL: https://download.developer.apple.com/ios/ios_sdk_4.1__final/xcode_3.2.4_and_ios_sdk_4.1.dmg Release Notes URL: https://download.developer.apple.com/ios/ios_sdk_4.1__final/finalv2_about_xcode_3.2.4_and_ios_sdk_4.1.pdf Requires: Mac OSX 10.6.2 SDKS: iOS: Version 3.2 (build ) Compilers: clang: Version 1.5 (build 60) gcc: Version 4.0 (build 5494) llvm: Version (build 2326.10) llvm_gcc: Version 4.2 (build 5658) Checksums: sha1: 970cc01f0edc22789f963560879069d6b94b37d4 Back to all xcode release list Xcode Release 3.2.3 (build 10M2262) at 2010-8-10 Xcode Version: 3.2.3 (build 10M2262)\n Release Date: 2010-8-10\n Direct Download URL: https://download.developer.apple.com/ios/ios_sdk_4.0.2__final/xcode_3.2.3_and_ios_sdk_4.0.2.dmg Requires: Mac OSX 10.6.2\n SDKS:\n iOS: Version 3.2 (build ) Compilers:\n clang: Version 1.5 (build 60) gcc: Version 4.0 (build 5494) llvm: Version (build 2326.10) llvm_gcc: Version 4.2 (build 5658) Checksums:\n sha1: 643c30f02575ee256a7ee1d15b5207602bb6d80d Back to all xcode release list Xcode Release 3.2.3 (build 10M2262) at 2010-7-6 Xcode Version: 3.2.3 (build 10M2262) Release Date: 2010-7-6 Direct Download URL: https://download.developer.apple.com/ios/ios_sdk_4.0.1__final/xcode_3.2.3_and_ios_sdk_4.0.1.dmg Release Notes URL: https://download.developer.apple.com/ios/ios_sdk_4.0.1__final/final_about_xcode_3.2.3_and_ios_sdk_4.0.1.pdf Requires: Mac OSX 10.6.2 SDKS: iOS: Version 3.2 (build ) Compilers: clang: Version 1.0.2 (build ) gcc: Version 4.0 (build 5493) llvm: Version (build 2207.5) llvm_gcc: Version 4.2 (build 5646) Checksums: sha1: 2f819168d227c71ca9e308d0c2d99f7f28bff2d3 Back to all xcode release list Xcode Release 3.2.2 (build 10M2154) at 2010-3-29 Xcode Version: 3.2.2 (build 10M2154) Release Date: 2010-3-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2.2_developer_tools_beta_20728/xcode322_2148_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2.2_developer_tools_beta_20728/about_xcode_3.2.2.pdf Requires: Mac OSX 10.6.2 SDKS: iOS: Version 3.2 (build ) Checksums: sha1: 7a5e2fa7ee2a93c933c3ecdddafc68c5ae5299e0 Back to all xcode release list Xcode Release 3.2.1 (build 10M2020) at 2009-10-7 Xcode Version: 3.2.1 (build 10M2020) Release Date: 2009-10-7 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2.1_developer_tools/xcode321_10m2003_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2.1_developer_tools/about_xcode_3.2.1.pdf Requires: Mac OSX 10.6 Compilers: gcc: Version 4.0 (build 5493) llvm: Version (build 2206) llvm_gcc: Version 4.2 (build 5646) Checksums: sha1: 59f42c249530199d07ef228f9c262f701ee2204e Back to all xcode release list Xcode Release 3.2 (build 10A432) at 2009-8-26 Xcode Version: 3.2 (build 10A432) Release Date: 2009-8-26 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2/xcode3210a432.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.2/about_xcode_3.2.pdf Requires: Mac OSX 10.6 SDKS: macOS: Version 10.4 (build ) Compilers: gcc: Version 4.0 (build 5493) llvm: Version (build 2118) llvm_gcc: Version 4.2 (build 5646) Checksums: sha1: cb47ef8de976ae5acd5570d0bb1df5cca2addbe0 Back to all xcode release list Xcode Release 3.1.4 (build 9M2809) at 2009-7-9 Xcode Version: 3.1.4 (build 9M2809) Release Date: 2009-7-9 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.4_developer_tools/xcode314_2809_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.4_developer_tools/about_xcode_tools_3.1.4.pdf Requires: Mac OSX 10.5.7 Compilers: gcc: Version 4.0 (build 5493) llvm: Version (build 2064.3) llvm_gcc: Version 4.2 (build 5555) Checksums: sha1: 143639af09af993d1f6ea45319ddcca0cf65df72 Back to all xcode release list Xcode Release 3.1.3 (build 9M2736) at 2009-6-16 Xcode Version: 3.1.3 (build 9M2736) Release Date: 2009-6-16 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.3_developer_tools/xcode313_2736_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.3_developer_tools/about_xcode_tools_3.1.3.pdf Requires: Mac OSX 10.5.7 SDKS: iOS: Version 3.1.3 (build ) Checksums: sha1: 666267db103ce5001f6004f032834216daa63bdc Back to all xcode release list Xcode Release 3.1.2 (build 9M2621) at 2008-11-23 Xcode Version: 3.1.2 (build 9M2621) Release Date: 2008-11-23 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.2_developer_tools/xcode312_2621_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.2_developer_tools/about_xcode_tools_3.1.2.pdf Requires: Mac OSX 10.5 Checksums: sha1: 12a4d23266db2c4c9e3891a9c07b280cefa576b3 Back to all xcode release list Xcode Release 3.1.1 (build 9M2517) at 2008-7-23 Xcode Version: 3.1.1 (build 9M2517) Release Date: 2008-7-23 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.1_developer_tools_preview_1/xcode311_9m2517_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1.1_developer_tools_preview_1/about_xcode_3.1.1_tools.pdf Requires: Mac OSX 10.5 Checksums: sha1: 27f436c179cd9ff1d263e6507a0f5aeb3cf4e3ac Back to all xcode release list Xcode Release 3.1 (build 9M2199) at 2008-7-10 Xcode Version: 3.1 (build 9M2199) Release Date: 2008-7-10 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1_developer_tools/xcode31_2199_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.1_developer_tools/about_xcode_tools_3.1.pdf Requires: Mac OSX 10.5 Checksums: sha1: e90f21f262dec5f1dae983e8fb53a613f2cc72b0 Back to all xcode release list Xcode Release 3.0 (build 9A581) at 2007-10-25 Xcode Version: 3.0 (build 9A581) Release Date: 2007-10-25 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_3.0/xcode_3.0.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_3.0/xcode_3.0_release_notes.pdf Requires: Mac OSX 10.5 SDKS: iOS: Version 2.0 (build ) macOS: Version 10.3 (build ) Checksums: sha1: fc212a810cd72fb224199b4f5977beb377042fad Back to all xcode release list Xcode Release 2.5 (build 8M2558) at 2007-10-29 Xcode Version: 2.5 (build 8M2558) Release Date: 2007-10-29 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_2.5_developer_tools/xcode25_8m2558_developerdvd.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_2.5_developer_tools/relnotesxcode25.pdf Requires: Mac OSX 10.4 Compilers: gcc: Version 4.0 (build 5370) Checksums: sha1: 30884704b0a4b098f02ccbb753958cd5331b8982 Back to all xcode release list Xcode Release 2.4.1 (build 8M1910) at 2006-10-30 Xcode Version: 2.4.1 (build 8M1910) Release Date: 2006-10-30 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_2.4.1/xcode_2.4.1_8m1910_6936315.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_2.4.1/xcode_2.4.1.readme.pdf Requires: Mac OSX 10.4 Checksums: sha1: 15204bc175c68c62045521c2b8df00760d1c4efc Back to all xcode release list Xcode Release 2.4 (build 8K1079) at 2006-8-17 Xcode Version: 2.4 (build 8K1079) Release Date: 2006-8-17 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_2.4/xcode_2.4_8k1079_6936199.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_2.4/xcode_2.4_readme.pdf Requires: Mac OSX 10.4 Checksums: sha1: 6c28120018125eb98de1d38035f89052ea1a4ad2 Back to all xcode release list Xcode Release 2.3 (build 8M1780) at 2006-5-23 Xcode Version: 2.3 (build 8M1780) Release Date: 2006-5-23 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_2.3/xcode_2.3_8m1780_oz693620813.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_2.3/xcode_2.3_readme_20060522.pdf Requires: Mac OSX 10.4 Checksums: sha1: aa768c0fb979eeb11c29f177f68c763fab14ea3f Back to all xcode release list Xcode Release 2.2.1 (build 8G1165) at 2006-1-13 Xcode Version: 2.2.1 (build 8G1165) Release Date: 2006-1-13 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_tools_2.2.1/xcode_2.2.1_8g1165_018213632.dmg Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_tools_2.2.1/xcode_2.2.1_readme.pdf Requires: Mac OSX 10.4 Checksums: sha1: 09b6520f017f6b49777de1b14b9ef53b46fd4427 Back to all xcode release list Xcode Release 1.5 (build 7K571) at 2004-8-4 Xcode Version: 1.5 (build 7K571) Release Date: 2004-8-4 Direct Download URL: https://download.developer.apple.com/Developer_Tools/xcode_v1.5/xcode_tools_1.5_cd.dmg.bin Release Notes URL: https://download.developer.apple.com/Developer_Tools/xcode_v1.5/554_xcode_tools_1.5_read_me.pdf Requires: Mac OSX 10.3 Checksums: sha1: 8791a663a35609f6e991f68f48f47f7ea1409fc7 Back to all xcode release list Xcode Release 1.0 (build 7B85) at 2003-9-28 Xcode Version: 1.0 (build 7B85)\n Release Date: 2003-9-28\n Direct Download URL: https://download.developer.apple.com/Mac_OS_X/Mac_OS_X_10.3_Build_7B85/7B85_Xcode_CD.dmg Requires: Mac OSX 10.3\n SDKS:\n macOS: Version 10.1.5 (build 5S60) Compilers:\n gcc: Version 3.3 (build 1495) Checksums:\n sha1: 819faddc921e8e396fce003100c67d8b4e675ab0 Back to all xcode release list \u0026ndash;\nCredit: https://xcodereleases.com/ References https://releases.llvm.org/ https://www.swift.org/download/ ","excerpt":"This page contains the complete Xcode release history, including the download link, release notes, …","ref":"https://djangocas.dev/blog/ios/xcode-release-history-download/","title":"Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information"},{"body":"Introduction to Jailbreaking Apple TV 4K Jailbreaking the fourth and fifth-generation Apple TVs is a slightly different process due to the distinct operation of tvOS compared to traditional Apple TV software. It\u0026rsquo;s important to note that the jailbreak method for Apple TV 4/4K only works on devices running tvOS 12 – 12.1.1. Those who have updated to tvOS 12.2 or later will not be able to jailbreak, as Apple has patched the jailbreak technique in later OS updates.\nSteps to Jailbreaking Apple TV 4K If you meet the requirements, follow the steps below to jailbreak your Apple TV:\n Download Cydia Impactor and the ChimeraTV jailbreak file on your Mac or PC. Connect your Apple TV to your computer using a USB-C to USB-A cable. If you don\u0026rsquo;t have one, you can purchase it on Amazon or similar platforms. Launch Cydia Impactor and drag the ChimeraTV file onto the application to load it. Then click \u0026ldquo;Start\u0026rdquo; to initiate the installation process. Cydia Impactor will prompt you to enter your Apple ID and password. These credentials are necessary to sign the app and allow it to be installed on your Apple TV. Using your personal Apple ID should be sufficient, but for added security, you can create an alternative Apple ID specifically for use with Cydia Impactor. Cydia Impactor will install the ChimeraTV app onto your Apple TV, preparing it for the jailbreak. Once the installation is complete, disconnect your Apple TV from your computer and reconnect it to your TV. On your Apple TV, locate the ChimeraTV app and open it. Within the ChimeraTV app, select your preferred options for the jailbreak and choose \u0026ldquo;Do it!\u0026rdquo; The jailbreak process will commence and may take a few minutes to complete. Once finished, you should see an on-screen message stating, \u0026ldquo;Success! Your TV has been liberated!\u0026rdquo; If the process fails and the device reboots, simply retry the process, as it may require multiple attempts to successfully jailbreak the Apple TV. Important Notes to Jailbreaking Apple TV 4K Please note that jailbreaking your Apple TV involves modifying the device\u0026rsquo;s software, which can lead to various risks, including security vulnerabilities and instability. Additionally, it may void your warranty and violate Apple\u0026rsquo;s terms of service. Proceed with caution and understand the potential consequences before undertaking this process.\nRelated pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting SwiftUI: How to Tap to Select All Text in a TextField on iOS Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc. Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD) Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... What\u0026#39;s new in SwiftUI iOS 16.4 beta 2 ","excerpt":"Introduction to Jailbreaking Apple TV 4K Jailbreaking the fourth and fifth-generation Apple TVs is a …","ref":"https://djangocas.dev/blog/ios/jailbreaking-apple-tv-4k/","title":"Guide: Jailbreaking Apple TV 4K"},{"body":"What is ISO 3166 country code ISO 3166 is a standard published by the International Organization for Standardization (ISO) that defines codes for the names of countries, dependent territories, special areas of geographical interest, and their principal subdivisions (e.g., provinces or states). The standard employs a code of letters and numbers to represent the name of a given geographical area in order to save time and energy when describing the area, as well as to reduce the risk of description errors. The official name of the standard is Codes for the representation of names of countries and their subdivisions.\nFrom: https://en.wikipedia.org/wiki/ISO_3166 \n The ISO 3166 country codes can be represented as following forms:\n Alpha-2 code: A two-letter code that represents a country name, recommended as the general purpose code. e.g. US. Alpha-3 code: A three-letter code that represents a country name, which is usually more closely related to the country name. e.g. USA Alpha-4 code: A four-letter code that represents a country name that is no longer in use. The structure depends on the reason why the country name was removed from ISO 3166-1 and added to ISO 3166-3. Numeric-3: A three-digit numeric code which can be useful if you need to avoid using Latin script. e.g. 840 for US. What\u0026rsquo;s the purpose of ISO 3166 country code The purpose of ISO 3166 is to define internationally recognized codes of letters and/or numbers that we can use when we refer to countries and their subdivisions. However, it does not define the names of countries – this information comes from United Nations sources (Terminology Bulletin Country Names and the Country and Region Codes for Statistical Use maintained by the United Nations Statistics Divisions).\nWhy use ISO 3166 country code Using codes saves time and avoids errors as instead of using a country’s name (which will change depending on the language being used), we can use a combination of letters and/or numbers that are understood all over the world.\nRemove country code form IOS 3166 Country names might be removed from ISO 3166-1 for various reasons\nA country might change a significant part of its name, for example Burma (BU) was changed to Myanmar (MM) in 1989. The code element for the formerly used country name is therefore BUMM.\nA country may divide into two or more new ones, for example Czechoslovakia was divided into Czech Republic and Slovakia in 1993. The code element for the formerly used country name Czechoslovakia is CSHH, HH meaning that no single successor country exists.\nTwo or more countries may merge for example Democratic Yemen (YD) and Yemen Arab Republic (YE) merged into the Republic of Yemen (YE) in 1990. The code element used for the formerly used country name Democratic Yemen is YDYE.\nCodes beginning with \u0026ldquo;X\u0026rdquo; Country codes beginning with \u0026ldquo;X\u0026rdquo; are used for private custom use (reserved), never for official codes. Despite the words “private custom”, the use may include other public standards. ISO affirms that no country code beginning X will ever be standardised. Examples of X codes include:\n The ISO 3166-based NATO country codes (STANAG 1059, 9th edition) use \u0026ldquo;X\u0026rdquo; codes for imaginary exercise countries ranging from XXB for \u0026ldquo;Brownland\u0026rdquo; to XXY for \u0026ldquo;Yellowland\u0026rdquo;, as well as for major commands such as XXE for SHAPE or XXS for SACLANT. X currencies defined in ISO 4217. Where to get the latest ISO 3166 country codes data You can search the latest ISO 3166 country codes at\nhttps://www.iso.org/obp/ui/#search Tip: Choose Country Codes in search to get accurate result.\nISO 3166 Country codes in JSON A ready to use country codes in JSON. Copy and paste to use in your code.\nThis is the latest total 212 ISO 3166 country codes with name, alpha2, alpha3 in JSON format.\n// countries.json [ {\u0026#34;name\u0026#34;:\u0026#34;Afghanistan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34; AF\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;AFG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Albania\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ALB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Algeria\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;DZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;DZA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;American Samoa\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ASM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Andorra\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AD\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;AND\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Angola\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;AGO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Anguilla\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;AIA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Antigua and Barbuda\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ATG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Argentina\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ARG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Armenia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ARM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Aruba\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ABW\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Australia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;AUS\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Austria\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;AUT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Azerbaijan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;AZE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bahamas\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BHS\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bahrain\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BH\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BHR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bangladesh\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BD\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BGD\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Barbados\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BB\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BRB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Belarus\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BY\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BLR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Belgium\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BEL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Belize\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BLZ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Benin\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BJ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BEN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bermuda\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BMU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bhutan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BTN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bolivia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BOL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bosnia and Herzegovina\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BIH\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Botswana\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BWA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Brazil\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BRA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;British Virgin Islands\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;VG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;VGB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Brunei Darussalam\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BRN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Bulgaria\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BGR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Burkina Faso\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BF\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BFA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Burundi\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;BI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;BDI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Cambodia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KH\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KHM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Cameroon\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CMR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Canada\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CAN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Cape Verde\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CV\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CPV\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Central African Republic\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CF\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CAF\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Chad\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TD\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TCD\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Chile\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CHL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;China\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CHN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Hong Kong\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;HK\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34; HKG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Macao\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MAC\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Colombia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;COL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Comoros\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;COM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Congo\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;COG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Costa Rica\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CRI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Côte d\u0026#39;Ivoire\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CIV\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Croatia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;HR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;HRV\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Cuba\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CUB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Cyprus\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CY\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CYP\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Czech Republic\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CZE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Denmark\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;DK\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;DNK\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Djibouti\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;DJ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;DJI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Dominica\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;DM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;DMA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Dominican Republic\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;DO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;DOM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Ecuador\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;EC\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ECU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Egypt\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;EG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;EGY\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;El Salvador\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SV\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SLV\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Equatorial Guinea\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GQ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GNQ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Eritrea\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ER\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ERI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Estonia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;EE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;EST\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Ethiopia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ET\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ETH\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;European Union\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;EU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Faroe Islands\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;FO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;FRO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Fiji\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;FJ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;FJI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Finland\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;FI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;FIN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;France\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;FR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;FRA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;French Guiana\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GF\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GUF\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;French Polynesia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PF\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PYF\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Gabon\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GAB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Gambia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GMB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Georgia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GEO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Germany\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;DE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;DEU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Ghana\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GH\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GHA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Greece\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GRC\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Greenland\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GRL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Grenada\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GD\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GRD\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Guadeloupe\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GP\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GLP\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Guam\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GUM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Guatemala\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GTM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Guinea-Bissau\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GNB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Haiti\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;HT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;HTI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Honduras\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;HN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;HND\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Hungry\u0026#34;, \u0026#34;alpha2\u0026#34;: \u0026#34;HU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;HUN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Iceland\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;IS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ISL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;India\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;IN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;IND\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Indonesia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ID\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;IDN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Iran (Islamic Republic of)\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;IR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;IRN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Iraq\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;IQ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;IRQ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Ireland\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;IE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;IRL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Israel\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;IL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ISR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Italy\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;IT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ITA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Japan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;JP\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;JPN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Jordan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;JO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;JOR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Kazakhstan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KAZ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Kenya\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KEN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Kiribati\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KIR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Korea\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KP\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PRK\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Korea\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KOR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Kuwait\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KWT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Kyrgyzstan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KGZ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Lao PDR\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LAO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Latvia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LV\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LVA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Lebanon\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LB\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LBN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Lesotho\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LSO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Liberia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LBR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Libya\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LY\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LBY\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Liechtenstein\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LIE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Lithuania\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LTU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Luxembourg\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LUX\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Madagascar\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MDG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Malawi\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MWI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Malaysia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MY\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MYS\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Maldives\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MV\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MDV\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Mali\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ML\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MLI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Malta\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MLT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Marshall Islands\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MH\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MHL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Martinique\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MQ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MTQ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Mauritania\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MRT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Mauritius\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MUS\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Mexico\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MX\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MEX\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Micronesia, Federated States of\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;FM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;FSM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Moldova\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MD\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MDA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Monaco\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MC\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MCO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Mongolia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MNG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Montenegro\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ME\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MNE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Montserrat\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MSR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Morocco\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MAR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Mozambique\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MOZ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Myanmar\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MMR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Namibia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NAM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Nauru\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NRU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Nepal\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NP\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NPL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Netherlands\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NLD\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Netherlands Antilles\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ANT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;New Caledonia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NC\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NCL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;New Zealand\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NZL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Nicaragua\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NIC\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Niger\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NER\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Nigeria\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NGA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Northern Mariana Islands\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;MP\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;MNP\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Norway\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;NO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;NOR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Oman\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;OM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;OMN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Pakistan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PK\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PAK\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Palau\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PLW\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Palestinian Territory\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PSE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Panama\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PAN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Papua New Guinea\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PNG\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Paraguay\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PY\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PRY\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Peru\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PER\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Philippines\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PH\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PHL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Pitcairn\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PCN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Poland\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;POL\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Portugal\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PRT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Puerto Rico\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;PR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;PRI\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Qatar\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;QA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;QAT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Réunion\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;RE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;REU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Romania\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;RO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ROU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Russian Federation\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;RU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;RUS\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Rwanda\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;RW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;RWA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Saint Kitts and Nevis\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;KN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;KNA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Saint Lucia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LC\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LCA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Saint Vincent and Grenadines\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;VC\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;VCT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Samoa\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;WS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;WSM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;San Marino\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SMR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Sao Tome and Principe\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ST\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;STP\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Saudi Arabia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SAU\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Senegal\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SEN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Serbia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;RS\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SRB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Seychelles\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SC\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SYC\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Sierra Leone\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SLE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Singapore\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SGP\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Slovakia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SK\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SVK\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Slovenia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SVN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Solomon Islands\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SB\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SLB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Somalia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SOM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;South Africa\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ZA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ZAF\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Spain\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ES\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ESP\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Sri Lanka\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;LK\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;LKA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Sudan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SD\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SDN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Suriname\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SUR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Swaziland\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SWZ\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Sweden\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SWE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Switzerland\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;CH\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;CHE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Syrian Arab Republic\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;SY\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;SYR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Taiwan (Province of China)\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TWN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Tajikistan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TJ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TJK\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Tanzania\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TZA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Thailand\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TH\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;THA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Timor-Leste\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TL\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TLS\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Togo\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TGO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Tonga\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TO\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TON\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Trinidad and Tobago\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TT\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TTO\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Tunisia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TUN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Turkey\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TR\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TUR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Turkmenistan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TKM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Tuvalu\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;TV\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;TUV\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Uganda\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;UG\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;UGA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Ukraine\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;UA\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;UKR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;United Arab Emirates\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;AE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ARE\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;United Kingdom\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;GB\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;GBR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;United States of America\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;US\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;USA\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Uruguay\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;UY\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;URY\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Uzbekistan\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;UZ\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;UZB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Vanuatu\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;VU\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;VUT\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Venezuela\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;VE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;VEN\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Viet Nam\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;VN\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;VNM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Virgin Islands, US\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;VI\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;VIR\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Yemen\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;YE\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;YEM\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Zambia\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ZM\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ZMB\u0026#34;}, {\u0026#34;name\u0026#34;:\u0026#34;Zimbabwe\u0026#34;, \u0026#34;alpha2\u0026#34;:\u0026#34;ZW\u0026#34;, \u0026#34;alpha3\u0026#34;:\u0026#34;ZWE\u0026#34;} ] Free to download and use it. Please leave a comment if you found a missing code or incorrect data.\nReferences ISO 3166 Country Codes ISO 3166 Country Codes on Online Browsing Platform List of ISO 3166 country codes ","excerpt":"What is ISO 3166 country code ISO 3166 is a standard published by the International Organization …","ref":"https://djangocas.dev/blog/posts/ios-3166-country-codes-json/","title":"The latest ISO 3166 country codes JSON with alpha-2, alpha-3 and country name"},{"body":"App security overview for iOS and iPadOS Unlike other mobile platforms, iOS and iPadOS don’t allow users to install potentially malicious unsigned apps from websites or to run untrusted apps. At runtime, code signature checks that all executable memory pages are made as they are loaded to help ensure that an app hasn’t been modified since it was installed or last updated.\nAfter an app is verified to be from an approved source, iOS and iPadOS enforce security measures designed to prevent it from compromising other apps or the rest of the system\nApp code signing process in iOS and iPadOS Mandatory code signing After the iOS or iPadOS kernel has started, it controls which user processes and apps can be run. To help ensure that all apps come from a known and approved source and haven’t been tampered with, iOS and iPadOS require that all executable code be signed using an Apple-issued certificate. Apps provided with the device, like Mail and Safari, are signed by Apple. Third-party apps must also be validated and signed using an Apple- issued certificate. Mandatory code signing extends the concept of chain of trust from the operating system to apps and helps prevent third-party apps from loading unsigned code resources or using self-modifying code\nHow developers sign their apps Developers can sign their apps through certificate validation (through the Apple Developer Program). They can also embed frameworks inside their apps and have that code validated with an Apple-issued certificate (through a team identifier string\n Certificate validation: To develop and install apps in iOS or iPadOS devices, developers must register with Apple and join the Apple Developer Program. The real-world identity of each developer, whether an individual or a business, is verified by Apple before their certificate is issued. This certificate enables developers to sign apps and submit them to the App Store for distribution. As a result, all apps in the App Store have been submitted by an identifiable person or organization, serving as a deterrent to the creation of malicious apps. They have also been reviewed by Apple to help ensure they generally operate as described and don’t contain obvious bugs or other notable problems. In addition to the technology already discussed, this curation process gives users confidence in the quality of the apps they buy.\n Code signature validation: iOS and iPadOS allow developers to embed frameworks inside of their apps, which can be used by the app itself or by extensions embedded within the app. To protect the system and other apps from loading third-party code inside of their address space, the system performs a code signature validation of all the dynamic libraries that a process links against at launch time. This verification is accomplished through the team identifier (Team ID), which is extracted from an Apple-issued certificate. A team identifier is a 10-character alphanumeric string—for example, 1A2B3C4D5F. A program may link against any platform library that ships with the system or any library with the same team identifier in its code signature as the main executable. Since the executables shipping as part of the system don’t have a team identifier, they can only link against libraries that ship with the system itself.\n Verifying enterprise apps Businesses also have the ability to write in-house apps for use within their organization and distribute them to their employees. Businesses and organizations can apply to the Apple Developer Enterprise Program (ADEP) with a D-U-N-S number. Apple approves applicants after verifying their identity and eligibility. After an organization becomes a member of ADEP, it can register to obtain a provisioning profile that permits in-house apps to run on devices it authorizes.\nUsers must have the provisioning profile installed to run the in-house apps. This helps ensure that only the organization’s intended users are able to load the apps onto their iOS and iPadOS devices. Apps installed through mobile device management (MDM) are implicitly trusted because the relationship between the organization and the device is already established. Otherwise, users have to approve the app’s provisioning profile in Settings. Organizations can restrict users from approving apps from unknown developers.\nOn first launch of any enterprise app, the device must receive positive confirmation from Apple that the app is allowed to run.\nSecurity of runtime process in iOS and iPadOS Sandboxing All third-party apps are “sandboxed,” so they are restricted from accessing files stored by other apps or from making changes to the device. Sandboxing is designed to prevent apps from gathering or modifying information stored by other apps. Each app has a unique home directory for its files, which is randomly assigned when the app is installed. If a third-party app needs to access information other than its own, it does so only by using services explicitly provided by iOS and iPadOS.\nSystem files and resources are also shielded from the users’ apps. Most iOS and iPadOS system files and resources run as the nonprivileged user “mobile,” as do all third-party apps. The entire operating system partition is mounted as read-only.\nUnnecessary tools, such as remote login services, aren’t included in the system software, and APIs don’t allow apps to escalate their own privileges to modify other apps or iOS and iPadOS.\nUse of entitlements Access by third-party apps to user information, and to features such as iCloud and extensibility, is controlled using declared entitlements. Entitlements are key-value pairs that are signed in to an app and allow authentication beyond runtime factors, like UNIX user ID. Since entitlements are digitally signed, they can’t be changed. Entitlements are used extensively by system apps and daemons to perform specific privileged operations that would otherwise require the process to run as root. This greatly reduces the potential for privilege escalation by a compromised system app or daemon. In addition, apps can only perform background processing through system-provided APIs. This enables apps to continue to function without degrading performance or dramatically impacting battery life.\nAddress Space Layout Randomization Address Space Layout Randomization (ASLR) helps protect against the exploitation of memory corruption bugs. Built-in apps use ASLR to help randomize all memory regions upon launch. Randomly arranging the memory addresses of executable code, system libraries, and related programming constructs reduces the likelihood of many exploits.\nFor example, a return-to-libc attack attempts to trick a device into executing malicious code by manipulating memory addresses of the stack and system libraries. Randomizing the placement of these makes the attack more difficult to execute, especially across multiple devices. Xcode, and the iOS or iPadOS development environments, automatically compile third-party programs with ASLR support turned on.\nExecute Never feature Further protection is provided by iOS and iPadOS using ARM’s Execute Never (XN) feature, which marks memory pages as nonexecutable. Memory pages marked as both writable and executable can be used only by apps under tightly controlled conditions: The kernel checks for the presence of the Apple-only dynamic code-signing entitlement. Even then, only a single mmap call can be made to request an executable and writable page, which is given a randomized address. Safari uses this functionality for its JavaScript JIT compiler.\nSupporting extensions in iOS, iPadOS, and macOS iOS, iPadOS, and macOS allow apps to provide functionality to other apps by providing extensions. Extensions are special-purpose signed executable binaries packaged within an app. During installation, the system automatically detects extensions and makes them available to other apps using a matching system.\nExtension points A system area that supports extensions is called an extension point. Each extension point provides APIs and enforces policies for that area. The system determines which extensions are available based on extension point–specific matching rules. The system automatically launches extension processes as needed and manages their lifetime. Entitlements can be used to restrict extension availability to particular system apps. For example, a Today view widget appears only in Notification Center, and a sharing extension is available only from the Sharing pane. Examples of extension points are Today widgets, Share, Actions, Photo Editing, File Provider, and Custom Keyboard.\nHow extensions communicate Extensions run in their own address space. Communication between the extension and the app from which it was activated uses interprocess communications mediated by the system framework. They don’t have access to each other’s files or memory spaces.\nExtensions are designed to be isolated from each other, from their containing apps, and from the apps that use them. They are sandboxed like any other third-party app and have a container separate from the containing app’s container. However, they share the same access to privacy controls as the container app. So if a user grants Contacts access to an app, this grant is extended to the extensions that are embedded within the app but not to the extensions activated by the app.\nHow custom keyboards are used Custom keyboards are a special type of extension because it’s enabled by the user for the entire system. After it’s enabled, a keyboard extension is used for any text field except the passcode input and any secure text view. To restrict the transfer of user data, custom keyboards run by default in a very restrictive sandbox that blocks access to the network, to services that perform network operations on behalf of a process, and to APIs that would allow the extension to exfiltrate typing data. Developers of custom keyboards can request that their extension have Open Access, which lets the system run the extension in the default sandbox after getting consent from the user.\nMDM and extensions For devices enrolled in a mobile device management (MDM) solution, document and keyboard extensions obey Managed Open In rules. For example, the MDM solution can help prevent users from exporting a document from a managed app to an unmanaged Document Provider, or help prevent them from using an unmanaged keyboard with a managed app.\nAdditionally, app developers can prevent the use of third-party keyboard extensions within their app.\nApp protection and app groups in iOS and iPadOS Adopting Data Protection in apps The iOS Software Development Kit (SDK) for iOS and iPadOS offers a full suite of APIs that make it easy for third-party and in-house developers to adopt Data Protection and help ensure the highest level of protection in their apps. Data Protection is available for file and database APIs, including NSFileManager, CoreData, NSData, and SQLite.\nThe Mail app database (including attachments), managed books, Safari bookmarks, app launch images, and location data are also stored through encryption, with keys protected by the user’s passcode on their device. Calendar (excluding attachments), Contacts, Reminders, Notes, Messages, and Photos implement the Data Protection entitlement Protected Until First User Authentication. User-installed apps that don’t opt in to a specific Data Protection class receive Protected Until First User Authentication by default.\nJoining an App Group Apps and extensions owned by a given developer account can share content when configured to be part of an App Group. It’s up to the developer to create the appropriate groups on the Apple Developer Portal and include the desired set of apps and extensions.\nOnce configured to be part of an App Group, apps have access to the following:\n A shared on-volume container for storage, which stays on the device as long as at least one app from the group is installed Shared preferences Shared keychain items The Apple Developer Portal helps ensure that App group IDs (GIDs) are unique across the app ecosystem.\nVerifying accessories in iOS and iPadOS The Made for iPhone, iPad, and iPod touch (MFi) licensing program provides vetted accessory manufacturers access to the iPod Accessories Protocol (iAP) and the necessary supporting hardware components.\nWhen an MFi accessory communicates with an iOS or iPadOS device using a Lightning or USB-C connector or through Bluetooth, the device asks the accessory to prove it’s been authorized by Apple by responding with an Apple-provided certificate, which is verified by the device. The device then sends a challenge, which the accessory must answer with a signed response. This process is entirely handled by a custom integrated circuit (IC) that Apple provides to approved accessory manufacturers and is transparent to the accessory itself.\nAccessories can request access to different transport methods and functionality—for example, access to digital audio streams over the Lightning or USB-C cable, or location information provided over Bluetooth. An authentication IC is designed to ensure that only approved accessories are granted full access to the device. If an accessory doesn’t support authentication, its access is limited to analog audio and a small subset of serial (UART) audio playback controls.\nAirPlay also uses the authentication IC to verify that receivers have been approved by Apple. AirPlay audio and CarPlay video streams use the MFi-SAP (Secure Association Protocol), which encrypts communication between the accessory and device using AES128 in counter (CTR) mode. Ephemeral keys are exchanged using ECDH key exchange (Curve25519) and signed using the authentication IC’s 1024-bit RSA key as part of the Station-to-Station (STS) protocol.\nRelated pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting SwiftUI: How to Tap to Select All Text in a TextField on iOS Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information Guide: Jailbreaking Apple TV 4K Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD) Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... What\u0026#39;s new in SwiftUI iOS 16.4 beta 2 References Apple Platform Security ","excerpt":"App security overview for iOS and iPadOS Unlike other mobile platforms, iOS and iPadOS don’t allow …","ref":"https://djangocas.dev/blog/ios/ios-app-security/","title":"iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc."},{"body":"Problem with shortcode like text in Hugo markdown In Hugo markdown, if you have some text wrapped by curly brackets likes following:\n Today: {{\u0026#x25;m%d%y}} You will receive an error similar to the following:\nError: Error building site: \u0026quot;foo.md:36:25\u0026quot;: failed to extract shortcode: template for shortcode \u0026quot;m\u0026quot; not found This is due to Hugo treat {{%m%d%d}} as its shortcode .\n A shortcode is a simple snippet inside a content file that Hugo will render using a predefined template. In your content files, a shortcode can be called by calling {{% shortcodename parameters %}}.\n Solution on how to escape shortcode in Hugo markdown Solution 1: Add space between {{ (curly bracket) and %. Today: {{ %m%d%y }} Solution 2: Escape % with unicode in HTML If you don\u0026rsquo;t want extra space between {{ and %, you can escape % with \u0026amp;#x25;. Example:\nToday: {{\u0026amp;#x25;m%d%y}} This trick is being used by this page.\nSolution 3: Use /* */ comment Use /* */ to quote the comment shortcode.\n{{\u0026lt; myshortcode param1=\u0026quot;value1\u0026quot; param2=\u0026quot;value2\u0026quot; \u0026gt;}} Related pages: Demystifying Hugo Shortcodes: Your Ultimate Guide Add comments to Static blog like Hugo, Jekyll with Isso Tips on Hugo SEO Custom hugo RSS template Hugo troubleshooting: execute of template failed: can\u0026#39;t give argument to non-function Add git commit date as last update date in hugo page References Hugo shortcode ","excerpt":"Problem with shortcode like text in Hugo markdown In Hugo markdown, if you have some text wrapped by …","ref":"https://djangocas.dev/blog/hugo/hugo-escape-shortcode-in-markdown/","title":"Hugo: How to escape shortcode in markdown"},{"body":"Introduction Continuous integration (CI) is the process of automating and streamlining the building, analyzing, testing, archiving, and publishing of your apps to ensure that they’re always in a releasable state.\nResolve Package Dependencies xcodebuild options related resolve package dependencies:\nxcodebuild -resolvePackageDependencies [-project \u0026lt;projectname\u0026gt;|-workspace \u0026lt;workspacename\u0026gt;] -clonedSourcePackagesDirPath \u0026lt;path\u0026gt; -runFirstLaunch install packages and agree to the license -clonedSourcePackagesDirPath PATH specifies the directory to which remote source packages are fetch or expected to be found -resolvePackageDependencies resolves any Swift package dependencies referenced by the project or workspace -disableAutomaticPackageResolution prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file -onlyUsePackageVersionsFromResolvedFile prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file -skipPackageUpdates Skip updating package dependencies from their remote -disablePackageRepositoryCache disable use of a local cache of remote package repositories -skipPackagePluginValidation Skip validation of package plugins (this can be a security risk if they are not from trusted sources) -packageCachePath path of caches used for package support The easiest way to resolve package dependencies is to simply run xcodebuild -resolvePackageDependencies.\nSPM Caches There are two directories for the SPM cache.\n ~/Library/org.swift.swiftpm ~/Library/Caches/org.swift.swiftpm ~/Library/Caches/org.swift.swiftpm/repositories/ includes git clone for remote package repo.\nSometimes we may need to clear these caches before the build to make sure the build is clean.\nFastlane Two lanes you for resolving dependencies and clear SPM cache. You may also need clear_derived_data before your build to make sure the build is clean.\nlane :resolve_package_dependencies do Dir.chdir(\u0026#34;..\u0026#34;) do sh(\u0026#34;xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile\u0026#34;) end end lane :clear_spm_cache do sh(\u0026#34;rm -rf ~/Library/org.swift.swiftpm\u0026#34;) sh(\u0026#34;rm -rf ~/Library/Caches/org.swift.swiftpm\u0026#34;) end Sample code in Fastfile to an ipa:\nlane :build do clear_derived_data clear_spm_cache resolve_package_dependencies gym(...) end Private SPM dependencies If your Xcode project have depends on private git repo. To resolve package dependencies that require authentication, or private packages, you need to provide credentials to your CI setup. In CI environment, Xcode can reuse git credential which used from clone code. The token may store in keychain, so make sure your keychain is accessible by CI scripts.\nIf you’re using the xcodebuild command directly, use SSH–based Git URLs for your packages and configure your SSH credentials. Set up your known_hosts file in the ~/.ssh directory of the macOS user that runs your CI tasks. xcodebuild honors your SSH configuration — there’s no additional setup required.\nTips Commit your Package.resolved file to your Git repository Commit your project’s Package.resolved file to your Git repository. This ensures a reliable CI workflow that always uses the expected version of a package dependency.\nUse the expected version of a package dependency To ensure the CI workflow’s reliability, make sure it uses the appropriate version of package dependencies. Xcode stores the exact version of each package dependency in a file called Package.resolved. The file automatically updates when package requirements in your Xcode project or in the Package.swift manifest file change. Commit this file to your Git repository to ensure it’s always up-to-date on the CI environment to prevent the CI from building your project with unexpected versions of package dependencies.\nYou can find the Package.resolved file inside your .xcodeproj directory at [appName].xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved.\nIn CI/CD, We want to prevent packages from automatically being resolved to versions other than those recorded in the Package.resolved file. This can be done with -onlyUsePackageVersionsFromResolvedFile\nxcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile It set IDEPackageOnlyUseVersionsFromResolvedFile = YES.\nExample:\n$ xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile User defaults from command line: IDEPackageOnlyUseVersionsFromResolvedFile = YES IDEPackageSupportUseBuiltinSCM = YES Resolve Package Graph ... ... resolved source packages: ... Here is another option -disableAutomaticPackageResolution. You might be wondering: What\u0026rsquo;s the difference?\nThe answser is they are they same. From xcodebuild -help shows the same description.\n-disableAutomaticPackageResolution prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file -onlyUsePackageVersionsFromResolvedFile prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file I also tried to play with -disableAutomaticPackageResolution and it have the same output with -onlyUsePackageVersionsFromResolvedFile.\nYou can compare this output with above output with -onlyUsePackageVersionsFromResolvedFile, both set IDEPackageOnlyUseVersionsFromResolvedFile = YES:\n$ xcodebuild -resolvePackageDependencies -disableAutomaticPackageResolution Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -disableAutomaticPackageResolution User defaults from command line: IDEPackageOnlyUseVersionsFromResolvedFile = YES IDEPackageSupportUseBuiltinSCM = YES Resolve Package Graph ... Troubleshooting Could not resolve package dependencies due to could not read Username for git server Symptom:\nxcodebuild: error: Could not resolve package dependencies: Couldn’t fetch updates from remote repositories: fatal: could not read Username for 'https://some-git-server.com': terminal prompts disabled Root Cause Analyze:\nThis is indicate there is no git credentienal, incorrect or token expired (if use token like bitbucket SCM token.)\nTo verify the issue, run git pull should get password promot:\n$ git pull Password for 'https://some-git-server': Keychain UI may also popup in this scenario.\nSolution:\nUse git ssh based authentication to avoid authentication issue. e.g. change from https:// to git@.\nRelated pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting SwiftUI: How to Tap to Select All Text in a TextField on iOS Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information Guide: Jailbreaking Apple TV 4K iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc. Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... What\u0026#39;s new in SwiftUI iOS 16.4 beta 2 References Building Swift packages or apps that use them in continuous integration workflows Swift Package Manager build times in a continuous integration platform ","excerpt":"Introduction Continuous integration (CI) is the process of automating and streamlining the building, …","ref":"https://djangocas.dev/blog/ios/swift-package-manager-spm-ci-tips-troubleshooting/","title":"Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD)"},{"body":"Types of Jailbreaks Tethered The device must be booted using a computer every time, otherwise it won\u0026rsquo;t boot at all. This type of jailbreak is uncommon.\ne.g.:\n 4039 blackra1n Semi-tethered The device must be jailbroken using a computer every time it\u0026rsquo;s rebooted, otherwise it will boot in unjailbroken state.\ne.g.:\n checkra1n palera1n Semi-untethered The device must be jailbroken using an app every time it\u0026rsquo;s rebooted, otherwise it will boot in unjailbroken state. A computer is usually used for the initial installation, but it\u0026rsquo;s not strictly necessary.\ne.g.:\n unc0ver Odyssey Pangu933 Permasigned semi-untethered The device must be jailbroken using an app every time it\u0026rsquo;s rebooted, otherwise it will boot in unjailbroken state. This app will remain signed on the device permanently.\ne.g.:\n unc0ver + fugu14 taurine-permanent Untethered The device will stay jailbroken after a reboot, no additional action is required. This type of jailbreak is uncommon.\ne.g.:\n Absinthe Etason Pangu9 What is rootless in palera1n? Rootless is the future of iOS 15+ jailbreaks. As of now, palera1n has full root support, at the expense of 5-10 GB of storage (or tethered). We aim to switch to rootless, to also bring a smoother experience.\nRecover mode and DFU mode Recover mode Recovery Mode is a failsafe in iBoot that is used to reflash the device with a new OS, whether the currently installed one is somehow damaged or the device is undergoing an upgrade via iTunes, Finder or Apple Configurator. This is not the same as the recoveryOS available on macOS, watchOS, tvOS and audioOS.\nIf you can\u0026rsquo;t update or restore your iPhone or iPod touch You can put your iOS device in recovery mode, then restore it using your computer.\nIn these situations, you might need to use recovery mode to restore your device:\n Your computer doesn\u0026rsquo;t recognize your device or says it\u0026rsquo;s in recovery mode. If your screen is stuck on the Apple logo for several minutes with no progress bar. You see the recovery mode screen. DFU mode DFU or Device Firmware Upgrade mode allows all devices to be restored from any state. It is essentially a mode where the BootROM can accept iBSS. DFU is part of the SecureROM which is burned into the hardware, so it cannot be removed. On A7+ devices, it generates an ApNonce and recognizes APTickets as well, so even in DFU, it can accept an APTicket.\nIn DFU mode, phone screen is black.\nEnter DFU mode for A11 and newer devices (iPhone 8 and above, iPad Pro 2018, iPad Air 2019, iPad Mini 2019)\n Connect the device to a computer using a USB cable. Quick-press the Volume Up button Quick-press the Volume Down button Hold down the Side button until the screen goes black, then hold down both the Side button and Volume Down button. After 5 seconds, release the Side button while continuing to hold down the Volume Down button. Note: If the Apple logo appears, the Side button was held down for too long.\nNothing will be displayed on the screen when the device is in DFU mode. Finder will alert you that a device was detected in DFU mode. How does palera1n works palera1n is (semi-)tethered checkm8 jailbreak. It requires a checkm8 vulnerable iOS device on iOS 15 or 16 (A8 - A11 or iPhone 6 - iPhone X).\nThe checkm8 exploit is a bootrom exploit with a CVE ID of CVE-2019-8900 used to run unsigned code on iOS, iPadOS, tvOS, watchOS, bridgeOS, audioOS, and Haywire devices with processors between an A5 and an A11, a S1P and a S3, a S5L8747, and a T2 (and thereby jailbreak it). Jailbreaks based on checkm8 are semi-tethered jailbreaks as the exploit works by taking advantage of a use-after-free in the USB DFU stack.\nJailbreak palera1n make it easy to jailbreak a vulnerable device, just download repo, run script and following instructions.\n$ git clone https://github.com/palera1n/palera1n.git $ cd palera1n $ ./palera1n.sh --tweaks 16.2 --semi-tethered palera1n | Version 1.4.1-main-a6af28a Made with ❤ by Nebula, Mineek, Nathan, llsc12, Ploosh, and Nick Chan [*] Waiting for devices [*] Detected normal mode device Hello, iPhone10,1 on 16.2! [*] Switching device into recovery mode... Telling device with udid xxxx to enter recovery mode. Device is successfully switching to recovery mode. [*] Waiting for device in recovery mode [*] Getting device info... [*] Press any key when ready for DFU mode Get ready (0) Hold volume down + side button (0) Release side button, but keep holding volume down (6) [*] Device entered DFU! [*] Device entered DFU! [*] Downloading BuildManifest Version: 9bfdde2b2456181045f74631683fba491d8bf4f2 - 38 libfragmentzip version: 0.64-aaf6fae83a0aa6f7aae1c94721857076d04a14e8-RELEASE init pzb: https://updates.cdn-apple.com/2022FallFCS/fullrestores/012-73379/0418E94A-C9E6-48E5-9FDF-E61EC6E79312/iPhone_4.7_P3_16.0.3_20A392_Restore.ipsw init done getting: BuildManifest.plist BuildManifest.plist: download succeeded [*] Downloading and decrypting iBoot Version: 9bfdde2b2456181045f74631683fba491d8bf4f2 - 38 libfragmentzip version: 0.64-aaf6fae83a0aa6f7aae1c94721857076d04a14e8-RELEASE init pzb: https://updates.cdn-apple.com/2022FallFCS/fullrestores/012-73379/0418E94A-C9E6-48E5-9FDF-E61EC6E79312/iPhone_4.7_P3_16.0.3_20A392_Restore.ipsw init done getting: Firmware/all_flash/iBoot.d20.RELEASE.im4p iBoot.d20.RELEASE.im4p: download succeeded usb_timeout: 5 [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Stage: RESET ret: true [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Stage: SPRAY ret: true [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Stage: SETUP ret: true [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Stage: PATCH ret: true [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Now you can boot untrusted images. [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 Found the USB handle. [*] Patching and signing iBoot Version: 7fd877ee7d57a91d2506155752077aad51f896aa-39 main: Starting... iOS 16 iBoot detected! getting get_debug_enabled_patch() patch getting get_sigcheck_patch() patch applying patch=0x180032c9c : 000080d2 applying patch=0x180032d40 : 000080d2 applying patch=0x1800348b8 : 200080d2 main: Writing out patched file to ibot.patched... main: Quitting... 000000018001c000[0000000000000300]: iboot_base 0000000180037c64[000000000001bc64]: check_bootmode 00000001800935ee[00000000000775ee]: bootx_str 000000018008e9d0[00000000000729d0]: bootx_cmd_handler 000000018008ea20[0000000000072a20]: go_cmd_handler 0000000180050228[0000000000034228]: zeroBuf 00000001800499f0[000000000002d9f0]: jumpto_bl 0000000180093f36[0000000000077f36]: kc_str set bootmode: REMOTE_BOOT(1) bootx -\u0026gt; dorwx change dorwx_cmd_handler -\u0026gt; 0000000180050228 change go_cmd_handler -\u0026gt; 00000001800502c0 writing sdram_page1 writing load_address copying payload... done jumpto_bl_opcode: 14001a46 kernelcache -\u0026gt; kernelcachd writing ibot.patched2... none [*] Resetting DFU state usb_timeout: 5 [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 Found the USB handle. [*] Booting device [==================================================] 100.0% Done! The device should now boot to iOS When you unlock the device, it will respring about 30 seconds after If this is your first time jailbreaking, open the new palera1n app, then press Install Otherwise, press Do All in the settings section of the app If you have any issues, please join the Discord server and ask for help: https://dsc.gg/palera1n Enjoy! Need follow instructions to let device go to DFU model. You may try several times to make it work. Then script will automatically do remaining work.\nUnjailbreak ./palera1n.sh --restorerootfs \u0026lt;iOS version you\u0026#39;re on\u0026gt; --tweaks $ ./palera1n.sh --restorerootfs 16.2 --tweaks [*] Command ran: ./palera1n.sh --restorerootfs 16.2 --tweaks palera1n | Version 1.4.1-main-b24a3bd Made with ❤ by Nebula, Mineek, Nathan, llsc12, Ploosh, and Nick Chan [*] Waiting for devices [*] Detected normal mode device Hello, iPhone10,1 on 16.2! [*] Switching device into recovery mode... Telling device with udid xxxx to enter recovery mode. Device is successfully switching to recovery mode. [*] Waiting for device in recovery mode download succeeded Version: 9bfdde2b2456181045f74631683fba491d8bf4f2 - 38 libfragmentzip version: 0.64-aaf6fae83a0aa6f7aae1c94721857076d04a14e8-RELEASE init pzb: https://updates.cdn-apple.com/2022FallFCS/fullrestores/012-73379/0418E94A-C9E6-48E5-9FDF-E61EC6E79312/iPhone_4.7_P3_16.0.3_20A392_Restore.ipsw init done getting: 098-13133-006.dmg download succeeded usb_timeout: 5 [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Now you can boot untrusted images. [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 Found the USB handle. usb_timeout: 5 [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Now you can boot untrusted images. [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 Found the USB handle. main: Starting... iOS 16 iBoot detected! getting get_debug_enabled_patch() patch getting get_sigcheck_patch() patch applying patch=0x180032c9c : 000080d2 applying patch=0x180032d40 : 000080d2 applying patch=0x1800348b8 : 200080d2 main: Writing out patched file to work/iBSS.patched... main: Quitting... none main: Starting... iOS 16 iBoot detected! getting get_boot_arg_patch(rd=md0 debug=0x2014e wdt=-1 serial=3 ) patch getting get_debug_enabled_patch() patch getting get_unlock_nvram_patch() patch getting get_sigcheck_patch() patch applying patch=0x180032c9c : 000080d2 applying patch=0x180032d40 : 000080d2 applying patch=0x18001e204 : 000080d2c0035fd6 applying patch=0x18001e25c : 000080d2c0035fd6 applying patch=0x180062378 : 000080d2c0035fd6 applying patch=0x1800348b8 : 200080d2 applying patch=0x180035f78 : d8150d10 applying patch=0x180050230 : 72643d6d64302064656275673d30783230313465207764743d2d312073657269616c3d332000 applying patch=0x18003acb8 : 1f2003d5 main: Writing out patched file to work/iBEC.patched... main: Quitting... none krnl main: Starting... main: Detected fat macho kernel Kernel: Adding AMFI_get_out_of_my_way patch... get_amfi_out_of_my_way_patch: Entering ... get_amfi_out_of_my_way_patch: Kernel-8792 inputted get_amfi_out_of_my_way_patch: Found Internal Error: No cdhash found. str loc at 0xa22ded get_amfi_out_of_my_way_patch: Found Internal Error: No cdhash found. str ref at 0x12c7734 get_amfi_out_of_my_way_patch: Patching AMFI at 0x12c09d0 main: Writing out patched file to work/kcache.patched... main: Quitting... krnl dtre rtsc rdsk /dev/disk2 /private/tmp/SSHRD \u0026#34;disk2\u0026#34; ejected. Reading work/ramdisk.dmg... IM4P outputted to: work/ramdisk.im4p Reading work/ramdisk.im4p... Reading work/IM4M... Creating Image4... Image4 file outputted to: sshramdisk/ramdisk.img4 none [*] Booting ramdisk usb_timeout: 5 [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 CPID: 0x8015 Found the USB handle. Now you can boot untrusted images. usb_timeout: 5 [IOKit] Waiting for the USB handle with VID: 0x5AC, PID: 0x1227 Found the USB handle. [*] Testing for baseband presence [*] Removing Jailbreak [*] Done! Rebooting your device (if it doesn\u0026#39;t reboot, you may force reboot) SSH Install terminal. Generate ssh key in /private/etc/ssh as root. # cd /private/etc/ssh # ssh-keygen -A Use iproxy (iproxy - A proxy that binds local TCP ports to be forwarded to the specified ports on a usbmux device) to forward local port (here is 2222) to device. iproxy [OPTIONS] LOCAL_PORT:DEVICE_PORT [LOCAL_PORT2:DEVICE_PORT2 ...] iproxy 2222:22 Bind local TCP port 2222 and forward to port 22 of the first device connected via USB.\nssh to device ssh root@localhost -p 2222 # default root password is alpine. To avoid type root password every time. Copy local ssh public key to device ~/.ssh/authorized_keys.\nssh-copy-id -p 2222 -i ~/.ssh/id_ed25519 root@localhost How encrypted ipa works Apple’s DRM is known as Fairplay, every time an app is downloaded from the App Store, or Apple’s online service for OTA rollouts, Testflight, they will be encrypted.\nThe DRM works by placing a special header into the app binary which in turn is encrypted with the Apple specific App Store account public key. At install time, this header is decrypted with the private key stored in your device.\nUse otool -l to check cryptid flag to see app is encrypted or not:\notool -l ExampleEncryptedApp.app/ExampleEncryptedApp | grep crypt cryptoff 417792 cryptsize 4096 cryptid 1 # Encrypted app otool -l ExampleUnEncryptedApp.app/ExampleUnEncryptedApp | grep crypt cryptoff 417792 cryptsize 4096 cryptid 0 # Not encrypted app frida dump to decrypt ipa git clone https://github.com/AloneMonkey/frida-ios-dump.git cd frida-ios-dump pip3 install -r requirements.txt --upgrade ./dump.sh com.example.app Start the target app com.example.app Dumping ExampleApp to /var/folders/4w/p521s4wd21s8pcck91vtvby40000gn/T Troubleshooting Device not boot after jailbreak Symptom:\nAfter jailbreak device stay in black screen and not boot.\nSolution:\nIf iPhone isn’t responding, and you can’t turn it off or on, try forcing it to restart.\nSteps to force restart iPhone 8 and later models:\n Press and quickly release the volume up button. Press and quickly release the volume down button. Press and hold the side button. When the Apple logo appears, release the side button. Steps to force restart iPhone 7:\nPress and hold both the volume down button and the Sleep/Wake button at the same time. When the Apple logo appears, release both buttons.\nSteps to force restart iPhone 6s or iPhone SE (1st generation):\nPress and hold both the Sleep/Wake button and the Home button at the same time. When the Apple logo appears, release both buttons.\niproxy: command not found Symptom:\n$ iproxy 2222:22 -bash: iproxy: command not found Solution:\niproxy is part of libimobiledevice, install it on Mac OS:\nbrew install libimobiledevice unable to attach to the specified process Symptom:\n$ ./dump.py com.example.app Start the target app com.example.app unable to attach to the specified process Solution:\nTry to launch app manually before run the dump.py.\nunable to launch iOS app: The operation couldn’t be completed Symptom:\n$ ./dump.py com.example.app Start the target app com.example.app unable to launch iOS app: The operation couldn’t be completed. This system service instance does not support \u0026#34;openApplication\u0026#34; Solution:\nTry to launch app manually before run the dump.py.\nFailed to enumerate applications: this feature requires an iOS Developer Disk Image to be mounted; run Xcode briefly or use ideviceimagemounter to mount one manually Symptom:\nFailed to enumerate applications: this feature requires an iOS Developer Disk Image to be mounted; run Xcode briefly or use ideviceimagemounter to mount one manually Solution:\nHere is how to use ideviceimagemounter to mount Developer Disk Image:\n$ ideviceimagemounter /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.2/DeveloperDiskImage.dmg /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.2/DeveloperDiskImage.dmg.signature Uploading /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.2/DeveloperDiskImage.dmg done. Mounting... Done. Status: Complete Common Issues Credit: Those common issues mainly for palera1n are from palera1n discord.\nCannot download apps from App Store Install Choicy and disable tweak injection into the App Store.\nDevice boots out of DFU Method 1\n Make sure your device is in normal or recovery mode. Connect your device to your computer. Run ./palera1n.sh dfuhelper (use sudo if on Linux). Follow the on-screen instructions. Method 2\n Power off your device. Connect it to your computer or a charger. As soon as the Apple logo comes on, start doing the DFU mode sequence. Restore rootfs still keeps app icons Theres an issue with restoring rootfs where it doesn’t uicache, there is no need to worry, this happens on a couple of other jailbreaks and serve no harm to the user or device.\nPressing “install” on each jailbreak DO NOT DO THIS. Its not recommended to do this as it would most likely break your jailbreak install. Instead press the gear icon and then press Do All.\nLibhooker wants to install Remove the Chimera and Odyssey repo immediately.\nThese repos are not meant to be used with palera1n and are able to break your jailbreak if you install anything from them.\npanics making loader not appear You may be encountering some issue related to panics and the loader “not appearing”, on A10+ make sure you have your passcode disabled before jailbreaking. (This does\nDaemons crashing on iOS 16.2+ Substitute may cause daemons to crash on iOS 16.2 and above. It\u0026rsquo;s recommended to downgrade to iOS 16.1.2 or below for now. Or you can try using ElleKit instead, but note that some tweaks don\u0026rsquo;t yet work with it.\njbinit DIED Your device may get stuck on a verbose boot screen, and if you look closely you\u0026rsquo;ll see a \u0026ldquo;jbinit DIED!\u0026rdquo; error near the top.\nThe simplest way to fix this is rm -rf blobs (use sudo if on Linux), then force reboot your device and try to jailbreak again.\nFor advanced users:\nYou can also try re-copying the other/rootfs files manually to the device using SSHRD.\nPackage is in a very bad inconsistent state You can fix this by running this command in a terminal:\nsudo dpkg -r --force-remove-reinstreq PACKAGE_NAME Could not connect to lockdownd Try the following steps to fix the issue:\n Unplug and replug your device Run idevicepair pair (use sudo on Linux) Trust the computer on your device if needed Run idevicepair pair again (use sudo on Linux) Alternatively, you can manually enter recovery mode before starting palera1n.\nloader app not appearing Restore rootfs and rejailbreak with --restorerootfs at the end of your previous command. If neither of these help, make sure you\u0026rsquo;re waiting enough time (15-30 seconds).\nOn iPads if other apps don’t appear along side the loader try installing TrollHelper from havoc, and install TrollStore.\nPlease reinstall Sileo via SSH If you have AutoSign installed and you reinstall/update Sileo, you\u0026rsquo;ll get the error message shown in the screenshot. Here\u0026rsquo;s how to fix it.\n Get access to a terminal by either using SSH or NewTerm Type sudo apt remove autosign. Unless you changed it, the password is alpine. Once it\u0026rsquo;s done, type sudo apt reinstall org.coolstar.sileo. Try running Sileo again. Feel free to upgrade it if that was what you were planning to do. Install AutoSign again. It should be fixed after these steps.\ncrash on open ldid -s /Applications/\u0026lt;appname\u0026gt;.app procursus Binaries will need to be resigned by the Procursus Team to fix killed 9, in the meantime, use palera1n strap repo. you can install it from nebula’s repo.\nNewTerm not launching Install NewTerm 2 from https://apt.itsnebula.net/ or get NewTerm3 beta.\n\u0026ldquo;Booted device\u0026rdquo; but not booted This may happen when the downloading and patching process is interrupted. Please run ./palera1n.sh clean (use with sudo if on Linux), then try again.\nIf that doesn\u0026rsquo;t fix it, it may be caused by an update from the Procursus repo. The quickest way to fix it is ./palera1n.sh --restorerootfs. Alternatively, you can manually restore /usr/libexec/dirs_cleaner from the rootfs snapshot using the sshrd script.\nSee also Use frida and objection to penetration test iOS app security References iOS 15.0-16.3 (semi-)tethered checkm8 jailbreak Technical analysis of the checkm8 exploit frida-ios-dump https://support.apple.com/guide/iphone/force-restart-iphone-iph8903c3ee6/15.0 https://support.apple.com/guide/iphone/force-restart-iphone-iph8903c3ee6/16.0/ios/16.0 If your iPhone won\u0026rsquo;t turn on or is frozen https://www.theiphonewiki.com/wiki/DFU_Mode palera1n on discord ","excerpt":"Types of Jailbreaks Tethered The device must be booted using a computer every time, otherwise it …","ref":"https://djangocas.dev/blog/ios/iphone8-ios-jailbreak-palera1n-and-troubleshooting-common-issues/","title":"Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa"},{"body":"Introduction What is frida? frida is a dynamic code instrumentation toolkit. It lets you inject snippets of JavaScript or your own library into native apps on Windows, macOS, GNU/Linux, iOS, Android, and QNX. Frida also provides you with some simple tools built on top of the Frida API.\nWhat is objection? objection is a runtime mobile exploration toolkit, powered by Frida, built to help you assess the security posture of your mobile applications, without needing a jailbreak. objection supports both iOS and Android.\nobjection for iOS key features :\n Patch iOS applications, embedding a Frida gadget that can be used with objection or just Frida itself. Interact with the filesystem, listing entries as well as upload \u0026amp; download files where permitted. Perform various memory related tasks, such as listing loaded modules and their respective exports. Attempt to bypass and simulate jailbroken or rooted environments. Discover loaded classes and list their respective methods. Perform common SSL pinning bypasses. Dynamically dump arguments from methods called as you use the target application. Interact with SQLite databases inline without the need to download the targeted database and use an external tool. Execute custom Frida scripts. Dump the iOS keychain, and export it to a file. Dump data from common storage such as NSUserDefaults and the shared NSHTTPCookieStorage. Dump various formats of information in human readable forms. Bypass certain forms of TouchID restrictions. Watch for method executions by targeting all methods in a class, or just a single method. Monitor the iOS pasteboard. Dump encoded .plist files in a human readable format without relying on external parsers. Install frida and objection Both frida and objection can be installed from pip (I use python3):\n$ pip3 install frida-tools $ pip3 install objection After installation, you get a batch of command line tools:\nfrida frida-create frida-kill frida-ps frida-rm frida-apk frida-discover frida-ls frida-pull frida-trace frida-compile frida-join frida-ls-devices frida-push objection Setup frida on iOS Frida supports two modes of operation: jailbroken or not jailbroken. This article focus on how to use frida and objection on not jailbroken iOS devices.\nFrida is able to instrument debuggable apps, and will inject Gadget automatically as of Frida 12.7.12.\nOnly a few requirements to be aware of:\n The iOS device should ideally be running iOS 13 or newer. The Developer Disk Image must be mounted. Xcode will mount it automatically as soon as it discovers the iOS USB device, but you can also do it manually by using ideviceimagemounter. Latest Gadget (Can download from https://github.com/frida/frida/releases ) must be present in the user’s cache directory. On macOS this is ~/.cache/frida/gadget-ios.dylib. Use frida on iOS To use frida, first you need connect your device with a usb cable.\nList running processes / apps frida-ps is a command-line tool for listing processes, which is very useful when interacting with a remote system.\n$ frida-ps -h usage: frida-ps [options] optional arguments: -h, --help show this help message and exit -D ID, --device ID connect to device with the given ID -U, --usb connect to USB device -R, --remote connect to remote frida-server -H HOST, --host HOST connect to remote frida-server on HOST --certificate CERTIFICATE speak TLS with HOST, expecting CERTIFICATE --origin ORIGIN connect to remote server with “Origin” header set to ORIGIN --token TOKEN authenticate with HOST using TOKEN --keepalive-interval INTERVAL set keepalive interval in seconds, or 0 to disable (defaults to -1 to auto-select based on transport) --p2p establish a peer-to-peer connection with target --stun-server ADDRESS set STUN server ADDRESS to use with --p2p --relay address,username,password,turn-{udp,tcp,tls} add relay to use with --p2p -O FILE, --options-file FILE text file containing additional command line options --version show program\u0026#39;s version number and exit -a, --applications list only applications -i, --installed include all installed applications -j, --json output results as JSON List all running processes To list all running processes, use frida-ps -U. Example:\n$ frida-ps -U PID Name ----- -------------------------------------------------------- 631 AMDEngagementExtension 523 AMPIDService 14447 ANECompilerService 4939 ANEStorageMaintainer 14339 ASPCarryLog 11699 AccountSubscriber 11706 AccountSubscriber 6859 Telegram ... To list all running apps (not include system processes), use frida-ps -Ua. For example:\n$ frida-ps -Ua PID Name Identifier ----- ----------------------------- ---------------------------- 10205 App Store com.apple.AppStore 6302 Calendar com.apple.mobilecal 637 Clock com.apple.mobiletimer 5980 Firefox org.mozilla.ios.Firefox 8954 Google com.google.GoogleMobile 321 Mail com.apple.mobilemail 5485 Maps com.apple.Maps 318 Notes com.apple.mobilenotes 5308 Photos com.apple.mobileslideshow 9423 Podcasts com.apple.podcasts 13559 PosterBoard com.apple.PosterBoard 6248 Safari com.apple.mobilesafari 571 Settings com.apple.Preferences 6859 Telegram ph.telegra.Telegraph 11181 TestFlight com.apple.TestFlight ... List all installed applications To list all installed applications, use frida-ps -Uai. For example:\n$ frida-ps -Uai 1 ↵ PID Name Identifier ----- ----------------------------- --------------------------------------------- 10205 App Store com.apple.AppStore 6302 Calendar com.apple.mobilecal 637 Clock com.apple.mobiletimer 5980 Firefox org.mozilla.ios.Firefox 321 Mail com.apple.mobilemail 5485 Maps com.apple.Maps 318 Notes com.apple.mobilenotes 5308 Photos com.apple.mobileslideshow 9423 Podcasts com.apple.podcasts 13559 PosterBoard com.apple.PosterBoard 6248 Safari com.apple.mobilesafari 571 Settings com.apple.Preferences 6859 Telegram ph.telegra.Telegraph 11181 TestFlight com.apple.TestFlight - Books com.apple.iBooks - Calculator com.apple.calculator - Camera com.apple.camera ... Use objection on iOS objection usage:\n$ objection --help 2 ↵ Usage: objection [OPTIONS] COMMAND [ARGS]... _ _ _ _ ___| |_|_|___ ___| |_|_|___ ___ | . | . | | -_| _| _| | . | | |___|___| |___|___|_| |_|___|_|_| |___|(object)inject(ion) Runtime Mobile Exploration by: @leonjza from @sensepost By default, communications will happen over USB, unless the --network option is provided. Options: -N, --network Connect using a network connection instead of USB. -h, --host TEXT [default: 127.0.0.1] -p, --port INTEGER [default: 27042] -ah, --api-host TEXT [default: 127.0.0.1] -ap, --api-port INTEGER [default: 8888] -g, --gadget TEXT Name of the Frida Gadget/Process to connect to. [default: Gadget] -S, --serial TEXT A device serial to connect to. -d, --debug Enable debug mode with verbose output. (Includes agent source map in stack traces) --help Show this message and exit. Commands: api Start the objection API server in headless mode. device-type Get information about an attached device. explore Start the objection exploration REPL. patchapk Patch an APK with the frida-gadget.so. patchipa Patch an IPA with the FridaGadget dylib. run Run a single objection command. signapk Zipalign and sign an APK with the objection key. version Prints the current version and exists. explore start an interactive command line to interaction with app. For example:\n$ objection -g 19978 explore Using USB device `iPhone` Agent injected and responds ok! _ _ _ _ ___| |_|_|___ ___| |_|_|___ ___ | . | . | | -_| _| _| | . | | |___|___| |___|___|_| |_|___|_|_| |___|(object)inject(ion) v1.11.0 Runtime Mobile Exploration by: @leonjza from @sensepost [tab] for command suggestions com.example.foobar on (iPhone: 16.0) [usb] # Use -g \u0026lt;pid\u0026gt; to attach an exist app. Can also use -g \u0026lt;bundle id\u0026gt; to launch app and attach it. For example:\n$ objection -g com.example.foobar explore ios info binary com.example.foobar on (iPhone: 16.0) [usb] # ios info binary Name Type Encrypted PIE ARC Canary Stack Exec RootSafe ---------------- ------- --------- ----- ----- ------ ---------- -------- Foobar execute False True True False False False FoobarReport dylib False False False False False False Get app bundle info Use ios bundles to list app frameworks and bundles. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # ios bundles list_frameworks Executable Bundle Version Path ---------------- --------------------------- ------- ------------------------------------------- FoobarReport com.example.FoobarReport 1 ...pp/Frameworks/FoobarReport.framework ...rivateFrameworks/AppleCVAPhoto.framework com.example.foobar on (iPhone: 16.0) [usb] # ios bundles list_bundles Executable Bundle Version Path ---------------- -------------------------------- ------- ------------------------------------------- /usr/lib/system ...eFrameworks/WebCore.framework/Frameworks /usr/lib/log BoundingPathData com.apple.uikit.BoundingPathData 1.0 ...itCore.framework/BoundingPathData.bundle Foobar com.example.foobar 1.0 ...240-4B53-8D7A-0403A37E2D4A/Foobar.app /usr/lib/swift /usr/lib RawCamera com.apple.RawCamera.bundle 9.13.0 ...em/Library/CoreServices/RawCamera.bundle List app directories com.example.foobar on (iPhone: 16.0) [usb] # env Name Path ----------------- --------------------------------------------------------------------------------------------- BundlePath /private/var/containers/Bundle/Application/83F9204D-7240-4B53-8D7A-0403A37E2D4C/Foobar.app CachesDirectory /var/mobile/Containers/Data/Application/BA1D1280-9900-439E-BEC3-0442B27E177C/Library/Caches DocumentDirectory /var/mobile/Containers/Data/Application/BA1D1280-9900-439E-BEC3-0442B27E177C/Documents LibraryDirectory /var/mobile/Containers/Data/Application/BA1D1280-9900-439E-BEC3-0442B27E177C/Library List files in app directory Use ls to list files in app directory, use cd to check working directory, for example:\ncom.example.foobar on (iPhone: 16.0) [usb] # ls NSFileType Perms NSFileProtection Read Write Owner Group Size Creation Name ---------- ----- ---------------- ---- ----- -------------- -------------- --------- ------------------------- ------------------------ Directory 493 None True False _installd (33) _installd (33) 96.0 B 1970-01-01 00:00:00 +0000 PlugIns Directory 493 None True False _installd (33) _installd (33) 128.0 B 1970-01-01 00:00:00 +0000 Base.lproj Directory 493 None True False _installd (33) _installd (33) 96.0 B 1970-01-01 00:00:00 +0000 _CodeSignature Directory 493 None True False _installd (33) _installd (33) 64.0 B 1970-01-01 00:00:00 +0000 META-INF Directory 493 None True False _installd (33) _installd (33) 96.0 B 1970-01-01 00:00:00 +0000 Frameworks Regular 420 None True False _installd (33) _installd (33) 1.6 KiB 2022-03-14 16:08:02 +0000 Info.plist Regular 420 None True False _installd (33) _installd (33) 8.0 B 2022-03-14 16:08:02 +0000 PkgInfo Regular 420 None True False _installd (33) _installd (33) 265.4 KiB 2022-03-14 15:57:10 +0000 embedded.mobileprovision Regular 493 None True False _installd (33) _installd (33) 422.9 KiB 2022-03-14 16:15:12 +0000 Foobar Readable: True Writable: False com.example.foobar on (iPhone: 16.0) [usb] # cd PlugIns com.example.foobar on (iPhone: 16.0) [usb] # ls NSFileType Perms NSFileProtection Read Write Owner Group Size Creation Name ---------- ----- ---------------- ---- ----- -------------- -------------- ------- ------------------------- ---------------------------- Directory 493 None True False _installd (33) _installd (33) 224.0 B 1970-01-01 00:00:00 +0000 foobar-shareextension.appex Readable: True Writable: False com.example.foobar on (iPhone: 16.0) [usb] # pwd Current directory: /private/var/containers/Bundle/Application/83F9204D-7240-4B53-8D7A-0403A37E2D4C/Foobar.app/PlugIns View file content Use file cat to view file content. It will download file then cat it locally. For example:\n[usb] # file cat Info.plist For plist type file, can also use ios plist cat \u0026lt;plist file path\u0026gt; to decode plist file. For example:\n[usb] # ios plist cat Info.plist Download file from device Use file download \u0026lt;file path\u0026gt; to download a file from device. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # file download Info.plist Downloading /private/var/containers/Bundle/Application/83F9204D-7240-4B53-8D7A-0403A37E2D4C/Foobar.app/Info.plist to Info.plist Streaming file from device... Writing bytes to destination... Successfully downloaded /private/var/containers/Bundle/Application/83F9204D-7240-4B53-8D7A-0403A37E2D4C/Foobar.app/Info.plist to Info.plist Get cookie Use ios cookies get to get cookies. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # ios cookies get No cookies found Dump all of the credentials Use ios nsurlcredentialstorage dump to dump all of the credentials in the shared NSURLCredentialStorage. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # ios nsurlcredentialstorage dump Protocol Host Port Authentication Method User Password -------- ---- ---- --------------------- ---- -------- Dump userdefaults Use ios nsuserdefaults get to get all of the entries. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # ios nsuserdefaults get { AKLastEmailListRequestDateKey = \u0026#34;2022-08-20 16:01:39 +0000\u0026#34;; AKLastIDMSEnvironment = 0; ... } List all loaded frameworks/modules Use memory list modules to list all the loaded modules in the current process. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # memory list modules Save the output by adding `--json modules.json` to this command Name Base Size Path ------------------------------------- ----------- -------------------- ------------------------------------------------------------------------------ Foobar 0x10010c000 131072 (128.0 KiB) /private/var/containers/Bundle/Application/83F9204D-7240-4B53-8D7A-0403A37E... FoobarShare 0x100200000 65536 (64.0 KiB) /private/var/containers/Bundle/Application/83F9204D-7240-4B53-8D7A-0403A37E... Foundation 0x1cffb8000 9744384 (9.3 MiB) /System/Library/Frameworks/Foundation.framework/Foundation libobjc.A.dylib 0x1cef28000 277568 (271.1 KiB) /usr/lib/libobjc.A.dylib libSystem.B.dylib 0x222101000 8192 (8.0 KiB) /usr/lib/libSystem.B.dylib Combine 0x1de138000 1376248 (1.3 MiB) /System/Library/Frameworks/Combine.framework/Combine CoreFoundation 0x1d5b24000 4083712 (3.9 MiB) /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation UIKit 0x24785a000 12288 (12.0 KiB) /System/Library/Frameworks/UIKit.framework/UIKit libswiftCore.dylib 0x1cfa1d000 5672960 (5.4 MiB) /usr/lib/swift/libswiftCore.dylib libswiftCoreFoundation.dylib 0x203615000 32756 (32.0 KiB) /usr/lib/swift/libswiftCoreFoundation.dylib libswiftCoreGraphics.dylib 0x1f8310000 28672 (28.0 KiB) /usr/lib/swift/libswiftCoreGraphics.dylib libswiftCoreImage.dylib 0x2353d1000 4096 (4.0 KiB) /usr/lib/swift/libswiftCoreImage.dylib ... List module exports Use memory list exports \u0026lt;module name\u0026gt; to list the exports of a module. module name list can get from memory list modules. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # memory list exports Pegasus Save the output by adding `--json exports.json` to this command Type Name Address -------- ----------------------------------------------------------------------------- ----------- function NSStringFromPGBackgroundPIPAuthorizationState 0x1fbc94d44 variable OBJC_CLASS_$_PGBackgroundPIPAuthorization 0x22cdb76a8 variable OBJC_CLASS_$_PGCommand 0x22cdb6f50 variable OBJC_CLASS_$_PGControlsViewModel 0x22cdb6f78 variable OBJC_CLASS_$_PGControlsViewModelValues 0x22cdb6fa0 variable OBJC_CLASS_$_PGInterruptionAssistant 0x22cdb6c58 variable OBJC_CLASS_$_PGMenuItem 0x22cdb7798 variable OBJC_CLASS_$_PGPictureInPictureApplication 0x22cdb6c80 variable OBJC_CLASS_$_PGPictureInPictureController 0x22cdb6d48 variable OBJC_CLASS_$_PGPictureInPictureProxy 0x22c074fc8 variable OBJC_CLASS_$_PGPictureInPictureViewController 0x22c0750e0 variable OBJC_CLASS_$_PGPlaybackState 0x22cdb7630 variable OBJC_CLASS_$_PGPlaybackStatePrerollAttributes 0x22cdb7518 variable OBJC_METACLASS_$_PGBackgroundPIPAuthorization 0x22cdb76d0 variable OBJC_METACLASS_$_PGCommand 0x22cdb6e60 variable OBJC_METACLASS_$_PGControlsViewModel 0x22cdb7220 variable OBJC_METACLASS_$_PGControlsViewModelValues 0x22cdb7248 variable OBJC_METACLASS_$_PGInterruptionAssistant 0x22cdb6cd0 variable OBJC_METACLASS_$_PGMenuItem 0x22cdb77c0 variable OBJC_METACLASS_$_PGPictureInPictureApplication 0x22cdb6cf8 variable OBJC_METACLASS_$_PGPictureInPictureController 0x22cdb6d70 variable OBJC_METACLASS_$_PGPictureInPictureProxy 0x22c074ff0 variable OBJC_METACLASS_$_PGPictureInPictureViewController 0x22c075248 variable OBJC_METACLASS_$_PGPlaybackState 0x22cdb7680 variable OBJC_METACLASS_$_PGPlaybackStatePrerollAttributes 0x22cdb7540 variable PGPegasusErrorDomain 0x225d13168 variable PGPictureInPictureProxyPictureInPictureActiveChangedNotification 0x225d12a48 variable PGPictureInPictureViewControllerPrefersIdleTimerDisabledDidChangeNotification 0x225d125b0 Use can also write output in json format with --json \u0026lt;output file path\u0026gt;. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # memory list exports Pegasus --json Pegasus_exports.json Writing exports as json to Pegasus_exports.json... Wrote exports to: Pegasus_exports.json Dump app memory Use memory dump all \u0026lt;output file path\u0026gt; to dump app memory to . For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # memory dump all appmem.dump Will dump 111 rw- images, totalling 718.5 MiB Dumping 512.0 MiB from base: 0x280000000 [####################################] 100% After dump memory, you can use strings to check readable strings in memory, for example:\n$ strings appmem.dump | grep -i username # search is there any username string in memory. $ strings appmem.dump | grep -i token # search is there any token string in memory. Dump/add/clear iOS key chain Use ios keychain to add/dump/clear iOS keychain:\nadd Add an entry to the iOS keychain dump Dump the keychain for the current app's entitlement group clear Delete all keychain entries for the current app's entitlement group ios keychain examples:\ncom.example.foobar on (iPhone: 16.0) [usb] # ios keychain dump Note: You may be asked to authenticate using the devices passcode or TouchID Save the output by adding `--json keychain.json` to this command Dumping the iOS keychain... Created Accessible ACL Type Account Service Data 2022-08-16 04:06:05 +0000 WhenUnlockedThisDeviceOnly None Password username foo 2022-08-16 04:06:05 +0000 WhenUnlockedThisDeviceOnly None Password token token12345 ... com.example.foobar on (iPhone: 16.0) [usb] # ios keychain clear Are you sure you want to clear the iOS keychain? [y/N]: y Clearing the keychain... Keychain cleared monitor pasteboard Use ios pasteboard monitor to monitor the iOS pasteboard. It will print pasteboard content after issue this command (it may take a few seconds). For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # ios pasteboard monitor com.example.foobar on (iPhone: 16.0) [usb] # (agent) [pasteboard-monitor] Data: loading this page Disable sslpinning Use ios sslpinning disable to disable ios sslpinning. For example:\ncom.example.foobar on (iPhone: 16.0) [usb] # ios sslpinning disable (agent) Hooking common framework methods (agent) Found NSURLSession based classes. Hooking known pinning methods. (agent) Hooking lower level SSL methods (agent) Hooking lower level TLS methods (agent) Hooking BoringSSL methods (agent) Registering job 759888. Type: ios-sslpinning-disable Troubleshootings Unable to connect to the frida server Use objection and got following error:\n$ objection -g 10204 explore Checking for a newer version of objection... Using USB device `iPhone` Unable to connect to the frida server: need Gadget to attach on jailed iOS; its default location is: /Users/foobar/.cache/frida/gadget-ios.dylib Frida is able to instrument debuggable apps, and will inject Gadget automatically. Gadget must be present in the user’s cache directory. On macOS this is ~/.cache/frida/gadget-ios.dylib.\nGadget can download from https://github.com/frida/frida/releases . The file name is frida-gadget--ios-universal.dylib.gz. Once download it, unzip and move to the default location.\nFailed to enumerate applications: this feature requires an iOS Developer Disk Image to be mounted Plugin a new iOS device and got following error:\n$ frida-ps -Ua Failed to enumerate applications: this feature requires an iOS Developer Disk Image to be mounted; run Xcode briefly or use ideviceimagemounter to mount one manually To use frida, the Developer Disk Image must be mounted. Xcode will mount it automatically as soon as it discovers the iOS USB device, but you can also do it manually by using ideviceimagemounter.\nIn xcode, Click Window -\u0026gt; Devices and Simulators, check the device connection status, wait a few minutes should be good to go.\nobjection stuck When use objection to launch app, it may stuck after app launched, the following:\n$ objection -g com.example.foobar explore Using USB device `iPhone` ... To workaround this, launch app manually, then use frida-ps to find the process id and use objection to attach it. For example:\n$ frida-ps -Ua 1 ↵ PID Name Identifier ----- ----------------------------- ---------------------------- 19978 Foobar Example com.example.foobar # \u0026lt;---- Get process id for objection 10205 App Store com.apple.AppStore ... $ objection -g 19978 explorer $ objection -g 19978 explore Using USB device `iPhone` Agent injected and responds ok! _ _ _ _ ___| |_|_|___ ___| |_|_|___ ___ | . | . | | -_| _| _| | . | | |___|___| |___|___|_| |_|___|_|_| |___|(object)inject(ion) v1.11.0 Runtime Mobile Exploration by: @leonjza from @sensepost [tab] for command suggestions com.example.foobar on (iPhone: 16.0) [usb] # Unable to connect to the frida server: unable to attach to the specified process Try to use objection to attach a process and failed with Unable to connect to the frida server: unable to attach to the specified process:\n$ objection -g 9002 explore 2 ↵ Using USB device `iPhone` Unable to connect to the frida server: unable to attach to the specified process This may due to app is not debuggable. For example, app is installed from app store or TestFlight.\nTo attach any process, you need patch the exist iOS application .\nBefore you can use any of the objection commands on an iOS application (build in release mode), the application\u0026rsquo;s IPA itself needs to be patched and code signed to load the FridaGadget.dylib on start. To patch an IPA though, a few things need to be done in preparation, such as getting an embedded.mobileprovision file, as well as a code signing certificate from Apple. Once you have these, objection has a patchipa subcommand that will help you take care of the rest.\nRelated pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting SwiftUI: How to Tap to Select All Text in a TextField on iOS Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information Guide: Jailbreaking Apple TV 4K iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc. Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD) Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... What\u0026#39;s new in SwiftUI iOS 16.4 beta 2 References frida iOS frida iOS Recipes Patching iOS Applications objection objection screenshots ","excerpt":"Introduction What is frida? frida is a dynamic code instrumentation toolkit. It lets you inject …","ref":"https://djangocas.dev/blog/use-frida-and-objection-to-penetration-test-ios-app-security/","title":"Use frida and objection to penetration test iOS app security"},{"body":"What is MAC address A media access control address (MAC address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use is common in most IEEE 802 networking technologies, including Ethernet, Wi-Fi, and Bluetooth. Within the Open Systems Interconnection (OSI) network model, MAC addresses are used in the medium access control protocol sublayer of the data link layer. As typically represented, MAC addresses are recognizable as six groups of two hexadecimal digits, separated by hyphens, colons, or without a separator. For example: 12:34:56:78:90:ab.\nReasons to change MAC address You may change MAC address for various reasons, like:\n Protect your privacy by avoid expose your real hardware info. Work around MAC filter, e.g. some network only allow a limited MAC to be connected. Network spoof attack/testing. How to change MAC address on Mac OS X To change MAC address, you can use ifconfig on older Mac OS, for example:\nsudo ifconfig en0 ether 12:34:56:78:90:ab Here en0 is your network interface name. To see available network interfaces:\nifconfig -a However, on the newer Mac OS like Monterey does not allow to change network MAC address, and you got error \u0026ldquo;ifconfig: ioctl (SIOCAIFADDR): Can\u0026rsquo;t assign requested address\u0026rdquo;:\nsudo ifconfig en0 ether 12:34:56:78:90:ab ifconfig: ioctl (SIOCAIFADDR): Can\u0026#39;t assign requested address You can\u0026rsquo;t change the network MAC address while the interface is associated with an SSID.\nYou need disassociate from network:\nsudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z airport is a utility app on your Mac to set up and manage your wireless network.\nUsage: airport \u0026lt;interface\u0026gt; \u0026lt;verb\u0026gt; \u0026lt;options\u0026gt; ... -z --disassociate Disassociate from any network ... Then you can use ifconfig to change network MAC address.\nYou can also use macchannger in brew to change network MAC address.\nbrew install macchanger macchanger -m 12:34:56:78:90:ab en0 Note: macchannger use the same command described here.\nSummary To change network MAC address on Mac, run following two commands:\nsudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z sudo ifconfig en0 ether 12:34:56:78:90:ab Related pages: Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... Fix Slow Wi-Fi on Mac OS X by Reset Wi-Fi configuration and Advanced Wireless Troubleshooting Use Linux SO_BINDTODEVICE and mac IP_BOUND_IF to bind socket to a network interface Secure Squid Proxy Server References https://developer.apple.com/forums/thread/684745 macchanger ","excerpt":"What is MAC address A media access control address (MAC address) is a unique identifier assigned to …","ref":"https://djangocas.dev/blog/mac/how-to-change-mac-network-mac-address/","title":"How to change Mac OS X network MAC address"},{"body":"In Linux, like Debian or Ubuntu system, want to install different version of java and can swith system java version easily, the easiest solution is use update-alternatives.\nupdate-alternatives creates, removes, maintains and displays information about the symbolic links comprising the Debian alternatives system.\nHow update-alternatives works It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. For example, many systems have several text editors installed at once. This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice for an editor to invoke if the user has not specified a particular preference.\nDebian\u0026rsquo;s alternatives system aims to solve this problem. A generic name in the filesystem is shared by all files providing interchangeable functionality. The alternatives system and the system administrator together determine which actual file is referenced by this generic name. For example, if the text editors ed(1) and nvi(1) are both installed on the system, the alternatives system will cause the generic name /usr/bin/editor to refer to /usr/bin/nvi by default. The system administrator can override this and cause it to refer to /usr/bin/ed instead, and the alternatives system will not alter this setting until explicitly requested to do so.\nThe generic name is not a direct symbolic link to the selected alternative. Instead, it is a symbolic link to a name in the alternatives directory, which in turn is a symbolic link to the actual file referenced. This is done so that the system administrator\u0026rsquo;s changes can be confined within the /usr/local/etc directory.\nWhere is java In Debian/Ubunut, java is symbol link in /bin/java which point to /etc/alternatives/java, which is another symbol link, it point to the current java path.\n# which java /bin/java # ls -l /bin/java lrwxrwxrwx 1 root root 22 Mar 25 20:53 /bin/java -\u0026gt; /etc/alternatives/java # ls -l /etc/alternatives/java lrwxrwxrwx 1 root root 46 Apr 7 09:07 /etc/alternatives/java -\u0026gt; /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java List installed java versions Use update-alternatives --list java to list all installed java paths. Example:\n# update-alternatives --list java /usr/lib/jvm/java-11-openjdk-arm64/bin/java /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java Switch java version with update-alternative Use update-alternatives --config java to update java version in interactive mode. Example:\n# update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-11-openjdk-arm64/bin/java 1111 auto mode * 1 /usr/lib/jvm/java-11-openjdk-arm64/bin/java 1111 manual mode 2 /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java 1081 manual mode Press \u0026lt;enter\u0026gt; to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java to provide /usr/bin/java (java) in manual mode # java -version openjdk version \u0026#34;1.8.0_312\u0026#34; OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode) When using the --config option, update-alternatives will list all of the choices for the link group of which given name is the master alternative name. The current choice is marked with a *. You will then be prompted for your choice regarding this link group. Depending on the choice made, the link group might no longer be in auto mode. You will need to use the --auto option in order to return to the automatic mode (or you can rerun --config and select the entry marked as automatic).\nIf you want to configure non-interactively you can use the --set option instead. For example, in script you donot want user input. You can use update-alternatives --set java \u0026lt;path\u0026gt; to update java version directly. Example:\n# update-alternatives --set java /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java update-alternatives: using /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java to provide /usr/bin/java (java) in manual mode root@9b816ba2e3cb:/project# java -version openjdk version \u0026#34;1.8.0_312\u0026#34; OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode) Use update-java-alternatives to update java version Alternative, a dedicate command update-java-alternatives can also be used to switch java version.\nupdate-java-alternatives updates all alternatives belonging to one runtime or development kit for the Java language. A package does provide these information of it\u0026rsquo;s alternatives in /usr/lib/jvm/.\u0026lt;jname\u0026gt;.jinfo.\nUse -l to list available java version example:\n# update-java-alternatives -l java-1.11.0-openjdk-arm64 1111 /usr/lib/jvm/java-1.11.0-openjdk-arm64 java-1.8.0-openjdk-arm64 1081 /usr/lib/jvm/java-1.8.0-openjdk-arm64 Use -s to set java version to Java 11 example:\n# update-java-alternatives -s java-1.11.0-openjdk-arm64 update-alternatives: error: no alternatives for mozilla-javaplugin.so # java -version openjdk version \u0026#34;11.0.14\u0026#34; 2022-01-18 OpenJDK Runtime Environment (build 11.0.14+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.14+9-Ubuntu-0ubuntu2.20.04, mixed mode) Get JAVA_HOME To get JAVA_HOME, use java -XshowSettings:properties -version to print all current java property settings and look for java.home. Example:\n# java -XshowSettings:properties -version Property settings: awt.toolkit = sun.awt.X11.XToolkit file.encoding = UTF-8 file.separator = / java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment java.awt.printerjob = sun.print.PSPrinterJob java.class.path = java.class.version = 55.0 java.home = /usr/lib/jvm/java-11-openjdk-arm64 java.io.tmpdir = /tmp java.library.path = /usr/java/packages/lib /usr/lib/aarch64-linux-gnu/jni /lib/aarch64-linux-gnu /usr/lib/aarch64-linux-gnu /usr/lib/jni /lib /usr/lib java.runtime.name = OpenJDK Runtime Environment java.runtime.version = 11.0.14+9-Ubuntu-0ubuntu2.20.04 java.specification.name = Java Platform API Specification java.specification.vendor = Oracle Corporation java.specification.version = 11 java.vendor = Ubuntu java.vendor.url = https://ubuntu.com/ java.vendor.url.bug = https://bugs.launchpad.net/ubuntu/+source/openjdk-lts java.version = 11.0.14 java.version.date = 2022-01-18 java.vm.compressedOopsMode = 32-bit java.vm.info = mixed mode java.vm.name = OpenJDK 64-Bit Server VM java.vm.specification.name = Java Virtual Machine Specification java.vm.specification.vendor = Oracle Corporation java.vm.specification.version = 11 java.vm.vendor = Ubuntu java.vm.version = 11.0.14+9-Ubuntu-0ubuntu2.20.04 jdk.debug = release line.separator = \\n os.arch = aarch64 os.name = Linux os.version = 5.10.0-12-arm64 path.separator = : sun.arch.data.model = 64 sun.boot.library.path = /usr/lib/jvm/java-11-openjdk-arm64/lib sun.cpu.endian = little sun.cpu.isalist = sun.io.unicode.encoding = UnicodeLittle sun.java.launcher = SUN_STANDARD sun.jnu.encoding = UTF-8 sun.management.compiler = HotSpot 64-Bit Tiered Compilers sun.os.patch.level = unknown user.country = US user.dir = /project user.home = /root user.language = en user.name = root user.timezone = openjdk version \u0026#34;11.0.14\u0026#34; 2022-01-18 OpenJDK Runtime Environment (build 11.0.14+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.14+9-Ubuntu-0ubuntu2.20.04, mixed mode) To get JAVA_HOME, check the java.home property. Example:\n# java -XshowSettings:properties -version 2\u0026gt;\u0026amp;1 |grep java.home java.home = /usr/lib/jvm/java-11-openjdk-arm64 Use grep and awk to extract value of java.home and set to JAVA_HOME. Example:\n# java -XshowSettings:properties -version 2\u0026gt;\u0026amp;1 |grep java.home | awk -F= \u0026#39;{print $2}\u0026#39; /usr/lib/jvm/java-11-openjdk-arm64 # JAVA_HOME=$(java -XshowSettings:properties -version 2\u0026gt;\u0026amp;1 |grep java.home | awk -F= \u0026#39;{print $2}\u0026#39;) Install different version of java First list available java version in apt. Example:\n# apt-cache search openjdk | grep \u0026#39;[-]jdk \u0026#39; openjdk-11-jdk - OpenJDK Development Kit (JDK) openjdk-8-jdk - OpenJDK Development Kit (JDK) openjdk-13-jdk - OpenJDK Development Kit (JDK) openjdk-16-jdk - OpenJDK Development Kit (JDK) openjdk-17-jdk - OpenJDK Development Kit (JDK) Then just install by apt-get, Example:\napt-get install -y openjdk-17-jdk Troubleshooting update-alternatives: command not found When run update-alternatives, got command not found error:\n# update-alternatives bash: update-alternatives: command not found update-alternatives is available in apt, use apt-get install to install:\napt-get install -y update-alternatives References update-alternatives(1) — Linux manual page update-java-alternatives(8) - Linux manual page ","excerpt":"In Linux, like Debian or Ubuntu system, want to install different version of java and can swith …","ref":"https://djangocas.dev/blog/linux/switch-java-version-with-update-alternatives/","title":"Switch Java Version with update-alternatives"},{"body":"Create TLS/SSL Certificate Use openssl req command to create a self signed SSL certificate or Certificate Signing Request (CSR) can be sent to a Certificate Authority (CA) which will then return an signed SSL certificate.\n$ openssl req -new -newkey rsa:2048 -keyout privkey.pem -nodes -out pubcert.csr Generating a RSA private key ...................................................................+++++ ........................................................................+++++ writing new private key to \u0026#39;privkey.pem\u0026#39; ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter \u0026#39;.\u0026#39;, the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:FL Locality Name (eg, city) []:Orlando Organization Name (eg, company) [Internet Widgits Pty Ltd]:Foo LLC Organizational Unit Name (eg, section) []:IT Common Name (e.g. server FQDN or YOUR name) []:www.example.com Email Address []:email@example.com Please enter the following \u0026#39;extra\u0026#39; attributes to be sent with your certificate request A challenge password []: An optional company name []: $ file privkey.pem pubcert.csr privkey.pem: ASCII text pubcert.csr: PEM certificate request Certificate subject can also passed by -subj parameter:\n$ openssl req -new \\ -newkey rsa:2048 -nodes -keyout privkey.pem \\ -out pubcert.csr \\ -subj \u0026#34;/C=US/ST=FL/L=Orlando/O=Foo LLC/OU=IT/CN=www.example.com\u0026#34; Hint Use -nodesparameter to NOT to encrypt the private key. This is useful when your web server starts automatically, say at boot time. If your private key is encrypted, you would be required to enter a password everytime your web server restarted. You could also omit this option to create an encrypted key and then later remove the encryption from the key. Verify CSR Use openssl req -verify to view CSR, -verify verify signature on CSR is not modified.\nopenssl req -verify example:\n$ openssl req -verify -in pubcert.csr -text -noout verify OK Certificate Request: Data: Version: 1 (0x0) Subject: C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com, emailAddress = email@example.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:96:1b:ec:3b:8c:8d:80:d9:f6:bc:e3:92:82:06: 6c:f6:97:15:56:5f:57:2e:de:7d:9c:7b:dd:a7:a4: 9f:dd:3b:b7:3d:fa:4b:20:5b:91:76:df:5c:d0:31: fb:7c:47:c2:29:63:7b:f1:b6:92:49:72:ca:e6:4d: d2:3e:e1:11:57:a6:a4:49:89:22:49:92:b9:76:a3: 17:a8:45:64:e7:1b:a0:f9:a8:0f:69:7e:b6:d3:ee: 42:f8:cd:b6:a2:79:fa:72:c3:5d:62:46:ed:db:29: df:63:46:a1:c3:3b:17:7d:a7:be:f7:09:cb:6d:e6: 70:06:9f:cd:95:d8:b5:bf:d1:c0:26:88:66:57:af: 84:f2:00:49:89:c8:db:8c:7c:81:3d:0e:2e:f4:77: d9:1c:9a:e2:78:43:98:4e:fa:b3:bf:2d:f2:2e:97: 11:17:6a:6d:ca:94:8e:2f:54:92:e7:16:25:ce:52: 46:bc:9d:98:89:d4:64:bd:ae:0a:97:72:a0:c5:73: 39:c9:87:d8:f5:97:e4:b8:3e:8d:73:d2:29:b3:4c: fb:7e:20:5b:45:c6:83:6d:a6:53:1c:6e:5c:4a:ef: 20:08:84:59:09:f4:9c:16:79:37:27:70:b5:c1:21: 5e:5e:94:0e:59:54:ce:4f:3e:5d:34:fc:f0:e0:ce: b4:a1 Exponent: 65537 (0x10001) Attributes: a0:00 Signature Algorithm: sha256WithRSAEncryption 7f:47:70:5c:1c:72:e4:c5:a4:7b:07:7c:3f:f5:ef:62:a1:c9: 8f:ae:52:35:ee:13:85:f7:ce:06:4a:b8:a1:ee:08:a2:39:f4: 90:6a:c6:4f:04:78:c3:67:22:98:97:b8:9c:c1:e6:c6:af:94: 1a:fd:f0:4c:67:34:3f:8d:05:3a:1a:8f:46:6f:0a:37:45:45: 44:7a:f9:51:1d:28:bf:53:f1:47:2c:01:73:03:42:08:0a:c3: 1f:5d:50:8a:b1:81:db:a0:df:4b:79:a1:86:2d:b1:3d:f7:2a: 4b:e2:ff:bc:0f:fc:cd:08:a7:b8:07:5d:fe:d7:b7:39:6f:7a: f0:9c:cc:1b:e9:5d:8e:d5:0b:00:9c:81:a6:c3:f2:33:87:52: 3c:b5:4a:14:3b:7d:2a:b8:53:86:da:b0:b3:3d:6a:2d:a7:c3: fa:1d:5f:fc:ea:37:6f:d2:44:ac:5d:a8:e5:73:43:69:a4:02: 5d:a0:08:dd:0a:59:40:fa:c9:38:00:d9:60:41:40:56:32:c0: 53:0d:97:8e:59:33:44:90:8b:48:a8:8c:c1:12:b2:60:bc:59: 0a:e8:ca:29:87:95:7f:40:fd:86:bd:f8:aa:92:c9:f0:12:cb: 82:cd:d8:5a:af:d2:3e:9a:dc:6b:f2:db:92:2d:a7:fc:6a:98: a8:04:5e:9e verfiy OK indicate signature verify and there is no tamper on CSR. Subject is the most important of CSR.\nCreate Self Signed Certificate pubcert.csr can be sent to public CA for signing or you can create self signed certificate.\n$ openssl req -x509 -days 365 -in pubcert.csr -key privkey.pem -out pubcert.pem $ file pubcert.pem pubcert.pem: PEM certificate Command line options explained:\n -x509 output a self-signed certificate rather than a CSR. -days 365 make the self-signed certificate valid for one year. -in pubcert.csr read in the CSR from the file pubcert.csr. -key privkey.pem read in the private key from the file privkey.pem. -out pubcert.pem write out the self-signed certificate to the file pubcert.pem. You can also generated self signed certificate in a single command:\n$ openssl req -x509 \\ -days 365 \\ -newkey rsa:2048 \\ -subj \u0026#34;/C=US/ST=FL/L=Orlando/O=Foo LLC/OU=IT/CN=www.example.com\u0026#34; \\ -keyout privkey2.pem \\ -nodes \\ -out pubcert.pem Generating a RSA private key ..+++++ .+++++ writing new private key to \u0026#39;privkey2.pem\u0026#39; ----- View Certificate View Certificate Detail $ openssl x509 -text -noout -in pubcert.pem Certificate: Data: Version: 3 (0x2) Serial Number: 53:20:19:3d:0f:f2:3b:b9:b0:9b:17:5e:b6:12:bd:ae:cf:31:e5:c0 Signature Algorithm: sha256WithRSAEncryption Issuer: C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com, emailAddress = email@example.com Validity Not Before: Feb 25 01:13:20 2022 GMT Not After : Feb 25 01:13:20 2023 GMT Subject: C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com, emailAddress = email@example.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:96:1b:ec:3b:8c:8d:80:d9:f6:bc:e3:92:82:06: 6c:f6:97:15:56:5f:57:2e:de:7d:9c:7b:dd:a7:a4: 9f:dd:3b:b7:3d:fa:4b:20:5b:91:76:df:5c:d0:31: fb:7c:47:c2:29:63:7b:f1:b6:92:49:72:ca:e6:4d: d2:3e:e1:11:57:a6:a4:49:89:22:49:92:b9:76:a3: 17:a8:45:64:e7:1b:a0:f9:a8:0f:69:7e:b6:d3:ee: 42:f8:cd:b6:a2:79:fa:72:c3:5d:62:46:ed:db:29: df:63:46:a1:c3:3b:17:7d:a7:be:f7:09:cb:6d:e6: 70:06:9f:cd:95:d8:b5:bf:d1:c0:26:88:66:57:af: 84:f2:00:49:89:c8:db:8c:7c:81:3d:0e:2e:f4:77: d9:1c:9a:e2:78:43:98:4e:fa:b3:bf:2d:f2:2e:97: 11:17:6a:6d:ca:94:8e:2f:54:92:e7:16:25:ce:52: 46:bc:9d:98:89:d4:64:bd:ae:0a:97:72:a0:c5:73: 39:c9:87:d8:f5:97:e4:b8:3e:8d:73:d2:29:b3:4c: fb:7e:20:5b:45:c6:83:6d:a6:53:1c:6e:5c:4a:ef: 20:08:84:59:09:f4:9c:16:79:37:27:70:b5:c1:21: 5e:5e:94:0e:59:54:ce:4f:3e:5d:34:fc:f0:e0:ce: b4:a1 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: FA:AD:07:CD:B2:96:2A:D5:EF:92:EF:95:29:B7:3E:83:F7:CB:BC:AB X509v3 Authority Key Identifier: keyid:FA:AD:07:CD:B2:96:2A:D5:EF:92:EF:95:29:B7:3E:83:F7:CB:BC:AB X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption 8d:75:b7:a1:fb:e2:76:62:24:82:83:f7:f3:dc:fc:25:de:63: 90:56:38:f3:89:c8:f0:c2:fa:e8:fc:57:7e:61:a3:ca:9e:e5: 7f:9b:f0:a9:82:44:b6:e1:09:7e:f1:b5:48:28:cf:07:fd:18: d1:a2:b3:ad:96:2b:ac:f1:89:c2:20:ee:b6:16:54:1f:6e:32: ca:07:9c:3b:21:01:61:48:dc:13:03:fd:d4:68:d2:da:1f:92: d9:6d:f5:ae:08:ff:94:24:ba:e1:20:8d:fe:21:70:bd:f5:f8: 06:5a:08:69:5f:14:71:8a:84:38:e3:09:80:ec:dc:fe:78:56: bd:e6:d3:00:7c:88:14:eb:2b:49:ae:ea:42:c5:61:4d:19:2f: 65:37:c6:33:c1:c5:0e:90:eb:43:cf:16:97:58:a7:d1:1e:37: cb:6d:3a:34:4a:2f:93:a9:2f:fe:c2:11:d1:41:f4:d4:f8:e6: b8:c7:bd:4f:c3:8d:fb:3d:df:5e:4c:c8:d3:69:e0:b5:71:ca: 2c:23:d3:b4:79:c7:28:8b:9e:d9:76:4c:ac:db:6d:87:02:bf: 16:a0:35:7c:74:f3:b3:ca:0a:cf:5b:cf:5c:c2:f3:1c:77:84: a9:8f:dd:3c:76:83:6a:79:15:a4:66:9b:7f:bd:2e:94:68:96: 3c:ad:23:f0 Verify A Certificate Matches A Private Key To verify a certificate match a private key, you can compare the modulus of the certificate with the modulus of the key.\nHint certificate is an X.509 PEM formatted file the private key is an RSA PEM formatted file, $ openssl x509 -in pubcert2.pem -noout -modulus Modulus=C4A33C0DD76C10B2B49DFD48727D6B55B1FB4730CD9398D2ED9BA54209403AF61815119A08EB60CD134B43487F5D3E994DBB0E47688113893F2D892EEB27F23E3A9B45F206466FC47CCC753D30A35546E372D297FB947C99C67C315CF7E89F818900FA1F4532747DA7B2FE01FE59E13BC07FF0A0E6A9C7B132271F52FDE0E11C41AB7B9E07E92CBA2A8962AC0A4CCF1D0A58091FA819311752A5281A514F7AD0BD47F4710B712193311AC3A94839A3B917E71A633D26B1870C1D7EA74220AD33E2876D7B6394961B00CB307CB2C37416DC9E017C28BBAF8D9B795C47565FC2FFD8E9C2FC9B377C67F5BB8660E833E5148DE5D0E5EBF131D1CC56CBD32BC9EFE7 $ openssl rsa -in privkey2.pem -noout -modulus Modulus=C4A33C0DD76C10B2B49DFD48727D6B55B1FB4730CD9398D2ED9BA54209403AF61815119A08EB60CD134B43487F5D3E994DBB0E47688113893F2D892EEB27F23E3A9B45F206466FC47CCC753D30A35546E372D297FB947C99C67C315CF7E89F818900FA1F4532747DA7B2FE01FE59E13BC07FF0A0E6A9C7B132271F52FDE0E11C41AB7B9E07E92CBA2A8962AC0A4CCF1D0A58091FA819311752A5281A514F7AD0BD47F4710B712193311AC3A94839A3B917E71A633D26B1870C1D7EA74220AD33E2876D7B6394961B00CB307CB2C37416DC9E017C28BBAF8D9B795C47565FC2FFD8E9C2FC9B377C67F5BB8660E833E5148DE5D0E5EBF131D1CC56CBD32BC9EFE7 View The Signer/Issuer of a Certificate $ openssl x509 -in pubcert.pem -noout -issuer -issuer_hash issuer=C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com a20a408a Hint Note that this command only gives you the entity that signed this certificate. It does NOT give you the root CA, since a certificate chain can contain many entities. To get to the root CA, you have to keep running this command on the \u0026ldquo;issuer\u0026rdquo; until you find a self-signed certificate (i.e. the \u0026ldquo;issuer\u0026rdquo; equals the \u0026ldquo;subject\u0026rdquo;). Find The Hash Value Of A Certificate $ openssl x509 -hash -in pubcert.pem -noout a20a408a Run TLS/SSL Server / Client with OpenSSL First use openssl s_server to start a TLS/SSL test server on port 8443:\n$ openssl s_server -accept 8443 -cert pubcert.pem -key privkey.pem Using default temp DH parameters ACCEPT Note Non-root user should use port higher than 1024, otherwise will get following error:\n140588109870400:error:0200600D:system library:bind:Permission denied:../crypto/bio/b_sock2.c:161: 140588109870400:error:20093075:BIO routines:BIO_bind:unable to bind socket:../crypto/bio/b_sock2.c:162: If pubcert.pem and privkey.pem not match, you will get following error:\nerror setting private key 139659904341312:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:../crypto/x509/x509_cmp.c:299: Then use openssl s_client to connect to test server on port 8443:\n$ openssl s_client -connect localhost:8443 CONNECTED(00000003) Can\u0026#39;t use SSL_get_servername depth=0 C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com verify error:num=18:self signed certificate verify return:1 depth=0 C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com verify return:1 --- Certificate chain 0 s:C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com i:C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com --- Server certificate -----BEGIN CERTIFICATE----- MIIDqzCCApOgAwIBAgIURWVosx4N45OHsogu3XH+XzIW7WowDQYJKoZIhvcNAQEL BQAwZTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkZMMRAwDgYDVQQHDAdPcmxhbmRv MRAwDgYDVQQKDAdGb28gTExDMQswCQYDVQQLDAJJVDEYMBYGA1UEAwwPd3d3LmV4 YW1wbGUuY29tMB4XDTIyMDIyNTAxMjI1OFoXDTIzMDIyNTAxMjI1OFowZTELMAkG A1UEBhMCVVMxCzAJBgNVBAgMAkZMMRAwDgYDVQQHDAdPcmxhbmRvMRAwDgYDVQQK DAdGb28gTExDMQswCQYDVQQLDAJJVDEYMBYGA1UEAwwPd3d3LmV4YW1wbGUuY29t MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxKM8DddsELK0nf1Icn1r VbH7RzDNk5jS7ZulQglAOvYYFRGaCOtgzRNLQ0h/XT6ZTbsOR2iBE4k/LYku6yfy PjqbRfIGRm/EfMx1PTCjVUbjctKX+5R8mcZ8MVz36J+BiQD6H0UydH2nsv4B/lnh O8B/8KDmqcexMicfUv3g4RxBq3ueB+ksuiqJYqwKTM8dClgJH6gZMRdSpSgaUU96 0L1H9HELcSGTMRrDqUg5o7kX5xpjPSaxhwwdfqdCIK0z4odte2OUlhsAyzB8ssN0 FtyeAXwou6+Nm3lcR1Zfwv/Y6cL8mzd8Z/W7hmDoM+UUjeXQ5evxMdHMVsvTK8nv 5wIDAQABo1MwUTAdBgNVHQ4EFgQUd6ojiNbdBFbkXAgwNiHuSck7XEgwHwYDVR0j BBgwFoAUd6ojiNbdBFbkXAgwNiHuSck7XEgwDwYDVR0TAQH/BAUwAwEB/zANBgkq hkiG9w0BAQsFAAOCAQEAZNvoERnZkIOPe7AUM27KrUnRXiv0Prr3/SGHI3dMkuqV oGf5sZji+wkXlN+rWkP76+bwxjhv3jA569DdFdgysbQlmhDSXR8JuLY+J6nDTWfr F22uzSyrnLX3OXOC97Wzgqm3mw6ANF4Ae2EQnSF7NveKPSU6HY7g+qUxypRbdM4Y aUzttmn7SyYeOz3Oa018zjl8LrEjBTi4C426dTBAbGBpc9eFOHN4cadxrNxTRIIz PqJEBKXGmjgvmtYxpK4sn1M9zuXJATIZWJMSDA1Vqkrs+QLsj/AO4efvmg/XzaaM kNpbmiKHwWSDuljjMoCmb64iyeZhuhw2sqUjP08u0A== -----END CERTIFICATE----- subject=C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com issuer=C = US, ST = FL, L = Orlando, O = Foo LLC, OU = IT, CN = www.example.com --- No client certificate CA names sent Peer signing digest: SHA256 Peer signature type: RSA-PSS Server Temp Key: X25519, 253 bits --- SSL handshake has read 1499 bytes and written 363 bytes Verification error: self signed certificate --- New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384 Server public key is 2048 bit Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated Early data was not sent Verify return code: 18 (self signed certificate) --- --- Post-Handshake New Session Ticket arrived: SSL-Session: Protocol : TLSv1.3 Cipher : TLS_AES_256_GCM_SHA384 Session-ID: 00B02A982394BB49CBB59489D250360FEB4CB7698FA063E79FFFE2D149E71B86 Session-ID-ctx: Resumption PSK: 729D19E3DFA1C40143098ABE55DB1FEB2DA023C4344385D0871D5A52F61AD960A9DB482D5DCA1248B4607C81EF4E5415 PSK identity: None PSK identity hint: None SRP username: None TLS session ticket lifetime hint: 7200 (seconds) TLS session ticket: 0000 - f5 fe f2 bf 29 29 3b ec-1b c3 7b 2c f5 33 85 ee ....));...{,.3.. 0010 - 4b 10 30 ae c3 2f df a1-79 d0 55 32 95 fc cb 1d K.0../..y.U2.... 0020 - d6 5d 89 74 c8 9b 59 dc-95 5c e8 3e cf 04 7d b4 .].t..Y..\\.\u0026gt;..}. 0030 - 39 63 be 3c 15 67 81 a9-b8 77 6a dd 1c 35 13 6d 9c.\u0026lt;.g...wj..5.m 0040 - b7 d6 36 e3 d6 c6 2b 47-e5 3e 8b 22 10 06 49 f0 ..6...+G.\u0026gt;.\u0026#34;..I. 0050 - b8 f3 2f b1 60 25 e5 31-94 f1 bf dd ed 67 85 ce ../.`%.1.....g.. 0060 - d9 34 6e 7c d9 6a 40 a1-67 b7 d6 73 f6 cf a3 2d .4n|.j@.g..s...- 0070 - 3e 86 9b d6 a4 ff 5d 6a-a1 f9 3d 1b 74 97 14 b5 \u0026gt;.....]j..=.t... 0080 - c4 82 fe 75 0f 29 28 7d-d1 23 72 90 3b 87 2e 97 ...u.)(}.#r.;... 0090 - cb 97 bf 79 99 20 fc d9-e4 7f 2e 82 0a d6 34 b3 ...y. ........4. 00a0 - 4e 81 92 9d 72 be 20 87-d2 dd 98 25 f2 6e fb b7 N...r. ....%.n.. 00b0 - 7f 37 fd 8b e1 5a e1 f6-d1 62 39 70 70 ed ba 79 .7...Z...b9pp..y Start Time: 1645755764 Timeout : 7200 (sec) Verify return code: 18 (self signed certificate) Extended master secret: no Max Early Data: 0 --- read R BLOCK --- Post-Handshake New Session Ticket arrived: SSL-Session: Protocol : TLSv1.3 Cipher : TLS_AES_256_GCM_SHA384 Session-ID: DAB883D6FFE06E83CCB3730949EFEC34EF2F30B84168FA7233B7B9B002DE6BDD Session-ID-ctx: Resumption PSK: A73F9311186AB1C0EA89C810775ACCD18B46B9CA3E93B3D3C4C077A646B5C95CE703ED39E4CC40725C0A8BEB1973BC86 PSK identity: None PSK identity hint: None SRP username: None TLS session ticket lifetime hint: 7200 (seconds) TLS session ticket: 0000 - f5 fe f2 bf 29 29 3b ec-1b c3 7b 2c f5 33 85 ee ....));...{,.3.. 0010 - e8 18 b7 f7 b5 65 05 d4-05 9c 88 99 97 75 23 91 .....e.......u#. 0020 - 38 3e 83 65 0d 86 43 08-3d 8f fb b4 69 0f a4 e4 8\u0026gt;.e..C.=...i... 0030 - d8 0d 56 70 c4 ed 71 3b-25 0e 71 f7 db bd f3 14 ..Vp..q;%.q..... 0040 - 7b 26 07 c5 9e ef be 76-2c 40 2a a4 d5 19 a6 a7 {\u0026amp;.....v,@*..... 0050 - 23 bf 3f 88 d2 41 4d 70-c6 7a c8 ad 28 7c 4b 55 #.?..AMp.z..(|KU 0060 - 74 a9 30 f8 9e b1 a4 36-38 a1 69 a8 11 44 ce a8 t.0....68.i..D.. 0070 - 06 7f ad 06 e6 32 1b 1e-d5 a8 8a f4 9a b2 be 3d .....2.........= 0080 - 06 71 56 c6 fa 31 cd c6-9e 74 a4 de 74 ae 02 c6 .qV..1...t..t... 0090 - 9e b8 c6 85 80 7c ae 28-ad d0 26 22 95 92 61 79 .....|.(..\u0026amp;\u0026#34;..ay 00a0 - 96 e4 e7 e7 39 4e 55 3b-31 f9 cd 36 ac ed 5c 8a ....9NU;1..6..\\. 00b0 - c0 b6 2c 7b 0d 67 0d ba-01 2c a4 50 a0 62 84 f5 ..,{.g...,.P.b.. 00c0 - 27 a6 73 74 e1 5b 31 02-f9 81 d9 cf 04 09 de e4 \u0026#39;.st.[1......... Start Time: 1645755764 Timeout : 7200 (sec) Verify return code: 18 (self signed certificate) Extended master secret: no Max Early Data: 0 --- read R BLOCK Hello After TLS/SSL connection established, send Hello to server.\nIn server side, it also output TLS/SSL handshake process, and then see Hello from client.\n$ openssl s_server -accept 8443 -cert pubcert.pem -key privkey.pem Using default temp DH parameters ACCEPT -----BEGIN SSL SESSION PARAMETERS----- MH4CAQECAgMEBAITAgQgRNcxBBZoIQo4mQbsQRv7DwAadeE3rHqXOftKcd2u8mME MKc/kxEYarHA6onIEHdazNGLRrnKPpOz08TAd6ZGtclc5wPtOeTMQHJcCovrGXO8 hqEGAgRiGD10ogQCAhwgpAYEBAEAAACuBwIFANB6X1w= -----END SSL SESSION PARAMETERS----- Shared ciphers:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA Signature Algorithms: ECDSA+SHA256:ECDSA+SHA384:ECDSA+SHA512:Ed25519:Ed448:RSA-PSS+SHA256:RSA-PSS+SHA384:RSA-PSS+SHA512:RSA-PSS+SHA256:RSA-PSS+SHA384:RSA-PSS+SHA512:RSA+SHA256:RSA+SHA384:RSA+SHA512:ECDSA+SHA224:RSA+SHA224:DSA+SHA224:DSA+SHA256:DSA+SHA384:DSA+SHA512 Shared Signature Algorithms: ECDSA+SHA256:ECDSA+SHA384:ECDSA+SHA512:Ed25519:Ed448:RSA-PSS+SHA256:RSA-PSS+SHA384:RSA-PSS+SHA512:RSA-PSS+SHA256:RSA-PSS+SHA384:RSA-PSS+SHA512:RSA+SHA256:RSA+SHA384:RSA+SHA512:ECDSA+SHA224:RSA+SHA224 Supported Elliptic Groups: X25519:P-256:X448:P-521:P-384 Shared Elliptic groups: X25519:P-256:X448:P-521:P-384 CIPHER is TLS_AES_256_GCM_SHA384 Secure Renegotiation IS supported Hello openssl req help $ openssl req -help Usage: req [options] Valid options are: -help Display this summary -inform PEM|DER Input format - DER or PEM -outform PEM|DER Output format - DER or PEM -in infile Input file -out outfile Output file -key val Private key to use -keyform format Key file format -pubkey Output public key -new New request -config infile Request template file -keyout outfile File to send the key to -passin val Private key password source -passout val Output file pass phrase source -rand val Load the file(s) into the random number generator -writerand outfile Write random data to the specified file -newkey val Specify as type:bits -pkeyopt val Public key options as opt:value -sigopt val Signature parameter in n:v form -batch Do not ask anything during request generation -newhdr Output \u0026#34;NEW\u0026#34; in the header lines -modulus RSA modulus -verify Verify signature on REQ -nodes Don\u0026#39;t encrypt the output key -noout Do not output REQ -verbose Verbose output -utf8 Input characters are UTF8 (default ASCII) -nameopt val Various certificate name options -reqopt val Various request text options -text Text form of request -x509 Output a x509 structure instead of a cert request (Required by some CA\u0026#39;s) -subj val Set or modify request subject -subject Output the request\u0026#39;s subject -multivalue-rdn Enable support for multivalued RDNs -days +int Number of days cert is valid for -set_serial val Serial number to use -addext val Additional cert extension key=value pair (may be given more than once) -extensions val Cert extension section (override value in config file) -reqexts val Request extension section (override value in config file) -precert Add a poison extension (implies -new) -* Any supported digest -engine val Use engine, possibly a hardware device -keygen_engine val Specify engine to be used for key generation operations Related pages: Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security testssl.sh examples command line tool check server TLS/SSL (weak) ciphers and detect TLS/SSL vulnerabilities ECDSA signature verify in kotlin and Golang Test TLS Connection Ciphers TLS Version and Certificate with OpenSSL Command Line Running a DoH Client to encrypt all home DNS traffic Secure Squid Proxy Server References openssl-req - PKCS#10 certificate request and certificate generating command openssl-x509 - Certificate display and signing command openssl-s_server - SSL/TLS server program openssl-s_client - SSL/TLS client program ","excerpt":"Create TLS/SSL Certificate Use openssl req command to create a self signed SSL certificate or …","ref":"https://djangocas.dev/blog/openssl-tls-ssl-certificate-csr-s_server-s_client-examples/","title":"OpenSSL CSR Examples: Self Signed Certificate and How to Start Test TLS/SSL Server/Client"},{"body":"Symptom In a table view cell layout, there is no layout constraints issue in xcode. However during run time, xcode console report following layout constraints issue:\n[LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012c0190 UIView:0x7fdefe74a240.height == 1 (active)\u0026gt;\u0026quot;, \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012c0960 MyModule.MyAwesomeControl:0x7fdefe721d90.height == 48 (active)\u0026gt;\u0026quot;, \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012c40a0 V:|-(16)-[UIImageView:0x7fdefe747ae0] (active, names: '|':UITableViewCellContentView:0x7fdefe747940 )\u0026gt;\u0026quot;, \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012c4410 V:[UIImageView:0x7fdefe747ae0]-(12)-[UIView:0x7fdefe74a240] (active)\u0026gt;\u0026quot;, \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012c4690 V:[UIView:0x7fdefe74a240]-(20)-[UITextView:0x7fdefe8f3400'No network is currently d...'] (active)\u0026gt;\u0026quot;, \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012c47d0 V:[MyModule.MyAwesomeControl:0x7fdefe721d90]-(50)-| (active, names: '|':UITableViewCellContentView:0x7fdefe747940 )\u0026gt;\u0026quot;, \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012c4820 MyModule.MyAwesomeControl:0x7fdefe721d90.top == UITextView:0x7fdefe8f3400'Awesome text here...'.top + 56 (active)\u0026gt;\u0026quot;, \u0026quot;\u0026lt;NSLayoutConstraint:0x6000012b9040 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fdefe747940.height == 32 (active)\u0026gt;\u0026quot; ) Will attempt to recover by breaking constraint \u0026lt;NSLayoutConstraint:0x6000012c0960 MyModule.MyAwesomeControl:0x7fdefe721d90.height == 48 (active)\u0026gt; The layout constraints include UIView-Encapsulated-Layout-Height which not part of original view layout constraints.\nHowever from the UI perspective, thought this warning exist, the layout looks correctly, it didn\u0026rsquo;t break the constraint mentioned above. It actually break 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fdefe747940.height == 32. It is kind of weird.\nAnalyze What is UIView-Encapsulated-Layout-Height The UIView-Encapsulated-Layout-Height constraint is added by UITableView, the value 32 (or whatever number) should be cell height. However in this case the actual cell height is not 32. 32 is estimated row height.\nAuto Height for TableView Cell In iOS, you can use Auto Layout to define the height of a table view cell; however, the feature is not enabled by default.\nNormally, a cell’s height is determined by the table view delegate’s tableView:heightForRowAtIndexPath: method. To enable self-sizing table view cells, you must set the table view’s rowHeight property to UITableViewAutomaticDimension. You must also assign a value to the estimatedRowHeight property. As soon as both of these properties are set, the system uses Auto Layout to calculate the row’s actual height.\nFirst make sure let UITableView determine its cell height automatically with use following code:\ntableView.estimatedRowHeight = 32; // or any number, but need set a number to make it work. tableView.rowHeight = UITableView.automaticDimension After this settings, the cell should calculate its height automatically.\nThen lay out the table view cell’s content within the cell’s content view. To define the cell’s height, you need an unbroken chain of constraints and views (with defined heights) to fill the area between the content view’s top edge and its bottom edge. If your views have intrinsic content heights, the system uses those values. If not, you must add the appropriate height constraints, either to the views or to the content view itself.\n Additionally, try to make the estimated row height as accurate as possible. The system calculates items such as the scroll bar heights based on these estimates. The more accurate the estimates, the more seamless the user experience becomes.\n The Real Scenario From the UI perspective, thought this warning exist, the layout looks correctly, it didn\u0026rsquo;t break the constraint mentioned above. It actually break 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fdefe747940.height == 32. Looks like Xcode give wrong warning at the first place.\nRoot Cause After code review I found a call to layoutIfNeeded() after change some view attributes. I suspect maybe this caused issue, the reason is when call layoutIfNeeded() it lays out the subviews immediately. Since the cell height is not determined yet, so it use estimated height and caused warning.\nAfter actual cell height is determined the cell will layout one more time with correct cell height. This explain why UI looks correct and not use estimated row height.\n layoutIfNeeded()\nDeclaration\nfunc layoutIfNeeded() Discussion\nUse this method to force the view to update its layout immediately. When using Auto Layout, the layout engine updates the position of views as needed to satisfy changes in constraints. Using the view that receives the message as the root view, this method lays out the view subtree starting at the root. If no layout updates are pending, this method exits without modifying the layout or calling any layout-related callbacks.\n Solution First make sure table view cell is set to auto height:\ntableView.rowHeight = UITableView.automaticDimension tableView.estimatedRowHeight = 32; Then the solution to remove this weird UIView-Encapsulated-Layout-Height warning is simple: find and remove un-necessary layoutIfNeeded(). Then Xcode will not report any layout constraints warnings and layout is correct.\nRelated pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting SwiftUI: How to Tap to Select All Text in a TextField on iOS Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information Guide: Jailbreaking Apple TV 4K iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc. Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD) Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... What\u0026#39;s new in SwiftUI iOS 16.4 beta 2 References UIView.layoutIfNeeded() Understanding Auto Layout ","excerpt":"Symptom In a table view cell layout, there is no layout constraints issue in xcode. However during …","ref":"https://djangocas.dev/blog/troubleshooting-ios-auto-layout-warning-about-uiview-encapsulated-layout-height/","title":"Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height"},{"body":"A formatted string literal or f-string is a string literal that is prefixed with \u0026lsquo;f\u0026rsquo; or \u0026lsquo;F\u0026rsquo;. These strings may contain replacement fields, which are expressions delimited by curly braces {}. While other string literals always have a constant value, formatted strings are really expressions evaluated at run time.\nFormatted string literals or f-string was introduced in Python 3.6.\nIf you want to print literal curly brace without any escape, you will get following:\n\u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;{\u0026#34;) File \u0026#34;\u0026lt;stdin\u0026gt;\u0026#34;, line 1 print(f\u0026#34;{\u0026#34;) ^ SyntaxError: f-string: expecting \u0026#39;}\u0026#39; \u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;}\u0026#34;) File \u0026#34;\u0026lt;stdin\u0026gt;\u0026#34;, line 1 print(f\u0026#34;}\u0026#34;) ^ SyntaxError: f-string: single \u0026#39;}\u0026#39; is not allowed \\ can not be used escape, you will get SyntaxError error:\n\u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;\\{\u0026#34;) File \u0026#34;\u0026lt;stdin\u0026gt;\u0026#34;, line 1 print(f\u0026#34;\\{\u0026#34;) ^ SyntaxError: f-string: expecting \u0026#39;}\u0026#39; \u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;\\}\u0026#34;) File \u0026#34;\u0026lt;stdin\u0026gt;\u0026#34;, line 1 print(f\u0026#34;\\}\u0026#34;) ^ SyntaxError: f-string: single \u0026#39;}\u0026#39; is not allowed According f-string definition:\n Escape sequences are decoded like in ordinary string literals (except when a literal is also marked as a raw string). After decoding, the grammar for the contents of the string is:\n f_string ::= (literal_char | \u0026quot;{{\u0026quot; | \u0026quot;}}\u0026quot; | replacement_field)* replacement_field ::= \u0026quot;{\u0026quot; f_expression [\u0026quot;=\u0026quot;] [\u0026quot;!\u0026quot; conversion] [\u0026quot;:\u0026quot; format_spec] \u0026quot;}\u0026quot; f_expression ::= (conditional_expression | \u0026quot;*\u0026quot; or_expr) (\u0026quot;,\u0026quot; conditional_expression | \u0026quot;,\u0026quot; \u0026quot;*\u0026quot; or_expr)* [\u0026quot;,\u0026quot;] | yield_expression conversion ::= \u0026quot;s\u0026quot; | \u0026quot;r\u0026quot; | \u0026quot;a\u0026quot; format_spec ::= (literal_char | NULL | replacement_field)* literal_char ::= \u0026lt;any code point except \u0026quot;{\u0026quot;, \u0026quot;}\u0026quot; or NULL\u0026gt; The parts of the string outside curly braces are treated literally, except that any doubled curly braces '{{' or '}}' are replaced with the corresponding single curly brace. A single opening curly bracket '{' marks a replacement field, which starts with a Python expression.\n The following code works:\n\u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;{{\u0026#34;) { \u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;}}\u0026#34;) } \u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;{{}}\u0026#34;) {} \u0026gt;\u0026gt;\u0026gt; print(f\u0026#34;{{foo}}\u0026#34;) {foo} This trick also apply to format string:\n Format strings contain “replacement fields” surrounded by curly braces {}. Anything that is not contained in braces is considered literal text, which is copied unchanged to the output. If you need to include a brace character in the literal text, it can be escaped by doubling: {{ and }}.\n This following example is example how to print literal curly brace '{' in format string:\n\u0026gt;\u0026gt;\u0026gt; print(\u0026#34;{ {}\u0026#34;.format(\u0026#34;Foo\u0026#34;)) Traceback (most recent call last): File \u0026#34;\u0026lt;stdin\u0026gt;\u0026#34;, line 1, in \u0026lt;module\u0026gt; ValueError: unexpected \u0026#39;{\u0026#39; in field name \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;{{ {}\u0026#34;.format(\u0026#34;Foo\u0026#34;)) { Foo \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;}} {}\u0026#34;.format(\u0026#34;Foo\u0026#34;)) } Foo \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;{{{{}}}} {}\u0026#34;.format(\u0026#34;Foo\u0026#34;)) {{}} Foo \u0026gt;\u0026gt;\u0026gt; print(\u0026#34;{{{}}} {}\u0026#34;.format(\u0026#34;Foo\u0026#34;)) Traceback (most recent call last): File \u0026#34;\u0026lt;stdin\u0026gt;\u0026#34;, line 1, in \u0026lt;module\u0026gt; IndexError: Replacement index 1 out of range for positional args tuple Related pages: Get the IP address of a network interface by its name in Python on Linux an Mac OS X How to Parse URLs in Python: A Comprehensive Guide with Examples Python unicode string lowercase and caseless match References https://docs.python.org/3/reference/lexical_analysis.html#f-strings https://docs.python.org/3/library/string.html#formatstrings ","excerpt":"A formatted string literal or f-string is a string literal that is prefixed with \u0026lsquo;f\u0026rsquo; or …","ref":"https://djangocas.dev/blog/python/python-literal-curly-braces-in-f-string/","title":"Python: How to print literal curly brace { or } in f-string and format string"},{"body":"Symptom I have nginx server running for months, suddenly got a alarm from monitor service indicate the nginx server is not providing service. I can ssh to server, so server is still online. Then check nginx server status use systemctl status nginx, I see nginx is not running due to a core dump. yes, even nginx may crash.\n$ systemctl status nginx # or sudo service nginx status ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: core-dump) since Thu 2022-01-06 18:51:49 PST; 702ms ago Docs: man:nginx(8) Process: 720751 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCES\u0026gt; Main PID: 700787 (code=dumped, signal=SEGV) Tasks: 0 (limit: 1110) Memory: 14.5M CGroup: /system.slice/nginx.service Jan 06 10:57:38 systemd[1]: Reloading A high performance web server and a reverse proxy server. Jan 06 10:57:38 systemd[1]: Reloaded A high performance web server and a reverse proxy server. Jan 06 18:51:46 systemd[1]: Reloading A high performance web server and a reverse proxy server. Jan 06 18:51:46 systemd[1]: Reloaded A high performance web server and a reverse proxy server. Jan 06 18:51:49 systemd[1]: nginx.service: Main process exited, code=dumped, status=11/SEGV Jan 06 18:51:49 systemd[1]: nginx.service: Killing process 718970 (nginx) with signal SIGKILL. Jan 06 18:51:49 systemd[1]: nginx.service: Killing process 718971 (nginx) with signal SIGKILL. Jan 06 18:51:49 systemd[1]: nginx.service: Killing process 718970 (nginx) with signal SIGKILL. Jan 06 18:51:49 systemd[1]: nginx.service: Killing process 718971 (nginx) with signal SIGKILL. Jan 06 18:51:49 systemd[1]: nginx.service: Failed with result \u0026#39;core-dump\u0026#39;. Use ps -ef|grep nginx also verified there is no nginx is running:\n$ ps -ef|grep nginx ubuntu 720761 718615 0 18:52 pts/0 00:00:00 grep --color=auto nginx I can restart nginx service manually to recover but I hope a Linux service can restart automatically to avoid any downtime.\nSolution to automatically restart Linux service to avoid downtime Luckily Linux systemd system and service manager already provide this feature in service configuration. You can specific Restart policy.\nService Restart policy This following the full description of Restart policy:\nConfigures whether the service shall be restarted when the service process exits, is killed, or a timeout is reached. The service process may be the main service process, but it may also be one of the processes specified with ExecStartPre=, ExecStartPost=, ExecStop=, ExecStopPost=, or ExecReload=. When the death of the process is a result of systemd operation (e.g. service stop or restart), the service will not be restarted. Timeouts include missing the watchdog \u0026ldquo;keep-alive ping\u0026rdquo; deadline and a service start, reload, and stop operation timeouts.\nRestart value takes one of no, on-success, on-failure, on-abnormal, on-watchdog, on-abort, or always.\nIf set to no (the default), the service will not be restarted.\nIf set to on-success, it will be restarted only when the service process exits cleanly. In this context, a clean exit means any of the following:\n exit code of 0; for types other than Type=oneshot, one of the signals SIGHUP, SIGINT, SIGTERM, or SIGPIPE; exit statuses and signals specified in SuccessExitStatus=. If set to on-failure, the service will be restarted when the process exits with a non-zero exit code, is terminated by a signal (including on core dump, but excluding the aforementioned four signals), when an operation (such as service reload) times out, and when the configured watchdog timeout is triggered.\nIf set to on-abnormal, the service will be restarted when the process is terminated by a signal (including on core dump, excluding the aforementioned four signals), when an operation times out, or when the watchdog timeout is triggered.\nIf set to on-abort, the service will be restarted only if the service process exits due to an uncaught signal not specified as a clean exit status. If set to on-watchdog, the service will be restarted only if the watchdog timeout for the service expires.\nIf set to always, the service will be restarted regardless of whether it exited cleanly or not, got terminated abnormally by a signal, or hit a timeout.\nTable: Exit causes and the effect of the Restart= settings\n┌──────────────┬────┬────────┬────────────┬────────────┬─────────────┬──────────┬─────────────┐ │Restart │ no │ always │ on-success │ on-failure │ on-abnormal │ on-abort │ on-watchdog │ │settings/Exit │ │ │ │ │ │ │ │ │causes │ │ │ │ │ │ │ │ ├──────────────┼────┼────────┼────────────┼────────────┼─────────────┼──────────┼─────────────┤ │Clean exit │ │ X │ X │ │ │ │ │ │code or │ │ │ │ │ │ │ │ │signal │ │ │ │ │ │ │ │ ├──────────────┼────┼────────┼────────────┼────────────┼─────────────┼──────────┼─────────────┤ │Unclean exit │ │ X │ │ X │ │ │ │ │code │ │ │ │ │ │ │ │ ├──────────────┼────┼────────┼────────────┼────────────┼─────────────┼──────────┼─────────────┤ │Unclean │ │ X │ │ X │ X │ X │ │ │signal │ │ │ │ │ │ │ │ ├──────────────┼────┼────────┼────────────┼────────────┼─────────────┼──────────┼─────────────┤ │Timeout │ │ X │ │ X │ X │ │ │ ├──────────────┼────┼────────┼────────────┼────────────┼─────────────┼──────────┼─────────────┤ │Watchdog │ │ X │ │ X │ X │ │ X │ └──────────────┴────┴────────┴────────────┴────────────┴─────────────┴──────────┴─────────────┘ As exceptions to the setting above, the service will not be restarted if the exit code or signal is specified in RestartPreventExitStatus= or the service is stopped with systemctl stop or an equivalent operation. Also, the services will always be restarted if the exit code or signal is specified in RestartForceExitStatus=.\nNote that service restart is subject to unit start rate limiting configured with StartLimitIntervalSec= and StartLimitBurst=, see systemd.unit(5) for details. A restarted service enters the failed state only after the start limits are reached.\nSetting this to on-failure is the recommended choice for long-running services, in order to increase reliability by attempting automatic recovery from errors. For services that shall be able to terminate on their own choice (and avoid immediate restarting), on-abnormal is an alternative choice.\nChange Restart policy systemctl have edit command to override the service config:\nedit UNIT... Edit a drop-in snippet or a whole replacement file if --full is specified, to extend or override the specified unit. To override existing unit file for nginx, Run sudo systemctl edit nginx, then paste following two lines to specific Restart policy as always to indicate the service will be restarted regardless of whether it exited cleanly or not, got terminated abnormally by a signal, or hit a timeout:\n[Service] Restart=always Save and quit. It should take effect immediately.\nThe sudo systemctl edit nginx command write nginx config in /etc/systemd/system/nginx.service.d/override.conf, you can use cat to see its content.\n$ cat /etc/systemd/system/nginx.service.d/override.conf [Service] Restart=always You can also check the full config of nginx service unit file by systemctl cat nginx.service\n$ systemctl cat nginx.service # /lib/systemd/system/nginx.service # Stop dance for nginx # ======================= # # ExecStop sends SIGSTOP (graceful stop) to the nginx process. # If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control # and sends SIGTERM (fast shutdown) to the main process. # After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends # SIGKILL to all the remaining processes in the process group (KillMode=mixed). # # nginx signals reference doc: # http://nginx.org/en/docs/control.html # [Unit] Description=A high performance web server and a reverse proxy server Documentation=man:nginx(8) After=network.target [Service] Type=forking PIDFile=/run/nginx.pid ExecStartPre=/usr/sbin/nginx -t -q -g \u0026#39;daemon on; master_process on;\u0026#39; ExecStart=/usr/sbin/nginx -g \u0026#39;daemon on; master_process on;\u0026#39; ExecReload=/usr/sbin/nginx -g \u0026#39;daemon on; master_process on;\u0026#39; -s reload ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid TimeoutStopSec=5 KillMode=mixed [Install] WantedBy=multi-user.target # /etc/systemd/system/nginx.service.d/override.conf [Service] Restart=always Then start nginx service:\n$ sudo systemctl start nginx $ systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/nginx.service.d └-override.conf Active: active (running) since Tue 2022-02-01 15:18:18 PST; 4s ago Docs: man:nginx(8) Process: 2302672 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 2302673 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 2302674 (nginx) Tasks: 3 (limit: 1113) Memory: 9.2M CGroup: /system.slice/nginx.service ├-2302674 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ├-2302675 nginx: worker process └-2302676 nginx: worker process Test kill nginx process by sudo pkill -f nginx, then use systemctl status nginx to check nginx status, you should see nginx is active (running) but with different process id, this indicate the nginx service restart automatically. cheers.\n$ sudo pkill nginx $ systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/nginx.service.d └-override.conf Active: active (running) since Tue 2022-02-01 15:18:56 PST; 2s ago Docs: man:nginx(8) Process: 2302830 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 2302831 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 2302832 (nginx) Tasks: 3 (limit: 1113) Memory: 9.8M CGroup: /system.slice/nginx.service ├-2302832 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ├-2302833 nginx: worker process └-2302834 nginx: worker process Summary To config a service restart automatically, use sudo systemctl edit \u0026lt;service name\u0026gt; to add following config:\n[Service] Restart=always Save and quit, that\u0026rsquo;s simple.\nRead more on Linux manual systemd(1) , systemctl(1) and systemd.service(5) .\nReferences systemd(1) — Linux manual page systemctl(1) — Linux manual page systemd.service(5) — Linux manual page Configure Debian start up services ","excerpt":"Symptom I have nginx server running for months, suddenly got a alarm from monitor service indicate …","ref":"https://djangocas.dev/blog/linux/linux-how-to-restart-service-automatically/","title":"Linux how to restart service automatically to avoid server downtime"},{"body":"Symptom iOS project use carthage frameworks, compile successfully. However crash at run time with \u0026ldquo;Library not loaded\u0026rdquo; error. For example:\ndyld: Library not loaded: libswiftXCTest.dylib Referenced from: ~/Library/Developer/CoreSimulator/Devices/E1234678-0F37-4991-B362-224440471FD7/data/Containers/Bundle/Application/55B7875B-11CB-4BE8-AA4F-38BACCC586B6/FooApp.app/FooApp Reason: image not found dyld: launch, loading dependent libraries Analyze of dyld: Library not loaded... error The error tells a framework can not not be loaded. In this example, the libswiftXCTest.dylib can not be found in app. There must some framework depends on libswiftXCTest.dylib. The question is how to find which framework depends on libswiftXCTest.dylib?\nLuckly, there is otool (object file displaying tool) for inspecting Mach-O binaries, otool can be used to find framework dependencies. with -L parameter:\n-L Display the names and version numbers of the shared libraries that the object file uses, as well as the shared library ID if the file is a shared library. Example of otool -L usage, with input and output:\n$ otool -L Carthage/Build/iOS/RxTest.framework/RxTest Carthage/Build/iOS/RxTest.framework/RxTest: @rpath/RxTest.framework/RxTest (compatibility version 1.0.0, current version 1.0.0) /usr/lib/swift/libswiftXCTest.dylib (compatibility version 1.0.0, current version 0.0.0, weak) /System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1770.255.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1) @rpath/RxSwift.framework/RxSwift (compatibility version 1.0.0, current version 1.0.0) @rpath/libswiftCore.dylib (compatibility version 1.0.0, current version 1200.2.41) @rpath/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 1.6.0, weak) @rpath/libswiftCoreGraphics.dylib (compatibility version 1.0.0, current version 2.0.0, weak) @rpath/libswiftCoreImage.dylib (compatibility version 1.0.0, current version 1.0.0, weak) @rpath/libswiftDarwin.dylib (compatibility version 1.0.0, current version 0.0.0, weak) @rpath/libswiftDispatch.dylib (compatibility version 1.0.0, current version 4.40.2, weak) @rpath/libswiftFoundation.dylib (compatibility version 1.0.0, current version 20.0.0) @rpath/libswiftMetal.dylib (compatibility version 1.0.0, current version 1.3.1, weak) @rpath/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 1.0.0, weak) @rpath/libswiftQuartzCore.dylib (compatibility version 1.0.0, current version 1.0.0, weak) @rpath/libswiftUIKit.dylib (compatibility version 1.0.0, current version 19.0.0, weak) With otool, we can find all the carthage frameworks with following command:\notool -L Carthage/Build/iOS/*.framework/* \u0026gt; dependencies.txt The above command write all the carthage frameworks dependencies into dependencies.txt.\nInside dependencies.txt, you can find which framework depends on missing framework.\notool quick reference USAGE llvm-otool [option…] [file…] DESCRIPTION otool is a tool for dumping Mach-O files. OPTIONS: -arch \u0026lt;value\u0026gt;\tSelect slice of universal Mach-O file. -C Print linker optimization hints. -D Print shared library id. -d Print data section. -f Print universal headers. -G Print data-in-code table. -h Print mach header. -I Print indirect symbol table. -j Print opcode bytes. -L Print used shared libraries. -l Print load commands. -mcpu=\u0026lt;value\u0026gt;\tSelect cpu for disassembly. -o Print Objective-C segment. -P Print __TEXT,__info_plist section as strings. -p \u0026lt;function name\u0026gt;\tStart disassembly at \u0026lt;function name\u0026gt;. -r Print relocation entries. -s \u0026lt;segname\u0026gt; \u0026lt;sectname\u0026gt;\tPrint contents of section. -t Print text section. -V Symbolize disassembled operands (implies -v). -v Verbose output / disassemble when printing text sections. -X Omit leading addresses or headers. -x Print all text sections. @\u0026lt;FILE\u0026gt; Read command-line options and commands from response file \u0026lt;FILE\u0026gt;. --version Print version. Related pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting SwiftUI: How to Tap to Select All Text in a TextField on iOS Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information Guide: Jailbreaking Apple TV 4K iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc. Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD) Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height What\u0026#39;s new in SwiftUI iOS 16.4 beta 2 References otool - Mach-O dumping tool ","excerpt":"Symptom iOS project use carthage frameworks, compile successfully. However crash at run time with …","ref":"https://djangocas.dev/blog/troubleshooting-loading-carthage-framework-error-dyld-library-not-loaded-rpath/.../","title":"Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/..."},{"body":"Problem If you have an Nginx server receiving requests from a proxy or behind a CDN, how can you get the client\u0026rsquo;s real IP instead of the proxy/CDN server\u0026rsquo;s IP in the access log?\n When using Cloudflare Argo Tunnel, the Nginx log shows the client IP as 127.0.0.1 or ::1.\n access_log log format The nginx access_log default use predefined combined format for log format, the log looks like:\n91.92.94.95 - - [03/Jan/2022:07:21:59 -0300] \u0026#34;GET /foo HTTP/1.1\u0026#34; 200 13831 \u0026#34;https://duckduckgo.com/\u0026#34; \u0026#34;Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36\u0026#34; According ngx_http_log_module log_format The configuration always includes the predefined “combined” format:\nlog_format combined \u0026#39;$remote_addr - $remote_user [$time_local] \u0026#39; \u0026#39;\u0026#34;$request\u0026#34; $status $body_bytes_sent \u0026#39; \u0026#39;\u0026#34;$http_referer\u0026#34; \u0026#34;$http_user_agent\u0026#34;\u0026#39;; remote_addr defined in ngx_http_core_module :\n$remote_addr client address Detail explain of $remote_addr Detail explain of $remote_addr (client address) with default nginx config:\n If user connect nginx server directly (no proxy, no CDN), the client address is user\u0026rsquo;s real IP. If user behind a proxy, the client address is proxy server. If CDN (Content Delivery Network) is used, the client address is CDN server address. Solution 1: Get client user real IP in nginx access_log In today\u0026rsquo;s web, a lot web server use CDN, it is useful to log client user\u0026rsquo;s real IP instead of CDN server IP. Fortunately, CDN servers send request with X-Forwarded-For header including client user\u0026rsquo;s real IP. We can use X-Forwarded-For header\u0026rsquo;s value in log.\nTo do this, first need define a log format in main nginx config. For example, in debian the nginx main config file is /etc/nginx/nginx.conf. Add a log_format config inside http block:\nhttp { ... log_format combined_realip \u0026#39;$http_x_forwarded_for - $remote_user [$time_local] \u0026#39; \u0026#39;\u0026#34;$request\u0026#34; $status $body_bytes_sent \u0026#39; \u0026#39;\u0026#34;$http_referer\u0026#34; \u0026#34;$http_user_agent\u0026#34;\u0026#39;; # For cloudflare argo tunnel, use $http_cf_connecting_ip to get `cf-connecting-ip` header log_format combined_realip_cf \u0026#39;$http_cf_connecting_ip $http_x_forwarded_for - $remote_user [$time_local] \u0026#39; \u0026#39;\u0026#34;$request\u0026#34; $status $body_bytes_sent \u0026#39; \u0026#39;\u0026#34;$http_referer\u0026#34; \u0026#34;$http_user_agent\u0026#34;\u0026#39;; } Then use access_log instruction to config file with our log format combined_realip:\naccess_log /var/log/nginx/mysite_access.log combined; access_log /var/log/nginx/mysite_access_realip.log combined_realip; access_log /var/log/nginx/mysite_access_realip_cf.log combined_realip_cf; error_log /var/log/nginx/mysite_error.log; Notes log_format have to be in main nginx config file (e.g. /etc/nginx/nginx.conf). It can not in virtual host config, otherwise you will got a error like following:\n nginx: [emerg] \u0026ldquo;log_format\u0026rdquo; directive is not allowed here in /etc/nginx/sites-enabled/foo.conf:11\n Can use multiple access_log to generate multiple access log file with different formats.\n X-Real-IP in request header instead of X-Forwarded-For Some proxy / CDN servers may pass X-Real-IP header instead of X-Forwarded-For, in this case, replace $http_x_forwarded_for with $http_x_real_ip in log_format definition:\nlog_format combined_realip \u0026#39;$http_x_real_ip - $remote_user [$time_local] \u0026#39; \u0026#39;\u0026#34;$request\u0026#34; $status $body_bytes_sent \u0026#39; \u0026#39;\u0026#34;$http_referer\u0026#34; \u0026#34;$http_user_agent\u0026#34;\u0026#39;; Solution 2: ngx_http_realip_module with real_ip_header nginx have a realip module is used to change the client address and optional port to those sent in the specified header field.\nWith realip, $remote_addr may change to client real IP address even client behind a proxy or request from CDN.\nrealip module is not built by default, it should be enabled with the --with-http_realip_module configuration parameter.\nTo check whether current installed nginx have --with-http_realip_module, use nginx -V to show configure options:\n$ nginx -V configure arguments: --with-cc-opt=\u0026#39;-g -O2 -fdebug-prefix-map=/build/nginx-KTLRnK/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2\u0026#39; --with-ld-opt=\u0026#39;-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC\u0026#39; --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-compat --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-headers-more-filter --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-auth-pam --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-cache-purge --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-dav-ext --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-ndk --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-echo --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-fancyindex --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/nchan --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-lua --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/rtmp --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-uploadprogress --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-upstream-fair --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-subs-filter --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-geoip2 $ nginx -V 2\u0026gt;\u0026amp;1 | tr -- - \u0026#39;\\n\u0026#39; | grep realip http_realip_module To use realip change $remote_addr to client user\u0026rsquo;s real IP. need following config in nginx main config:\nreal_ip_header X-Forwarded-For; real_ip_recursive on; set_real_ip_from \u0026lt;your proxy/CDN IP CIDR here\u0026gt;; set_real_ip_from defines trusted addresses that are known to send correct replacement addresses. If IPv6 is supported, need specific both IPv4 and IPv6:\nset_real_ip_from \u0026lt;your proxy/CDN IPv4 CIDR here\u0026gt;; set_real_ip_from \u0026lt;your proxy/CDN IPv6 CIDR here\u0026gt;; To trust real_ip_header (in this example X-Forwarded-For) in all IPv4 range, use 0.0.0.0/0:\nreal_ip_header X-Forwarded-For; real_ip_recursive on; set_real_ip_from 0.0.0.0/0; With this 3 lines of new config, we donot even need define new log format to get client user\u0026rsquo;s real IP. $remote_addr in combined log format is enough.\nNote In case of real_ip_header X-Forwarded-For, realip module uses the last ip address in the X-Forwarded-For header for replacement. Summary There are at least two solutions to log client user real IP address in nginx access log. Use ngx_http_realip_module with real_ip_header without define new log format and have minimal change impact to exist configurations and exist log files.\nTake X-Forwarded-For as example for client user real IP, you only need add following three lines in nginx main config (e.g. /etc/nginx/nginx.conf in Debian), inside http block:\n# # File: /etc/nginx/nginx.conf # http { ... real_ip_header X-Forwarded-For; real_ip_recursive on; set_real_ip_from 0.0.0.0/0; ... } NGINX config instruction syntax references The following section list NGINX config instruction syntax for quick reference.\nreal_ip_header syntax reference Syntax:\treal_ip_header field | X-Real-IP | X-Forwarded-For | proxy_protocol; Default: real_ip_header X-Real-IP; Context:\thttp, server, location Defines the request header field whose value will be used to replace the client address. The request header field value that contains an optional port is also used to replace the client port (1.11.0). The address and port should be specified according to RFC 3986. The proxy_protocol parameter (1.5.12) changes the client address to the one from the PROXY protocol header. The PROXY protocol must be previously enabled by setting the proxy_protocol parameter in the listen directive. real_ip_recursive syntax reference Syntax:\treal_ip_recursive on | off; Default: real_ip_recursive off; Context:\thttp, server, location This directive appeared in versions 1.3.0 and 1.2.1. If recursive search is disabled, the original client address that matches one of the trusted addresses is replaced by the last address sent in the request header field defined by the real_ip_header directive. If recursive search is enabled, the original client address that matches one of the trusted addresses is replaced by the last non-trusted address sent in the request header field. set_real_ip_from syntax reference Syntax:\tset_real_ip_from address | CIDR | unix:; Default:\t— Context:\thttp, server, location Defines trusted addresses that are known to send correct replacement addresses. If the special value unix: is specified, all UNIX-domain sockets will be trusted. Trusted addresses may also be specified using a hostname (1.13.1). IPv6 addresses are supported starting from versions 1.3.0 and 1.2.1. log_format syntax reference Syntax:\tlog_format name [escape=default|json|none] string ...; Default: log_format combined \u0026#34;...\u0026#34;; Context:\thttp Specifies log format. The `escape` parameter (1.11.8) allows setting json or default characters escaping in variables, by default, default escaping is used. The none value (1.13.10) disables escaping. For default escaping, characters “\u0026#34;”, “\\”, and other characters with values less than 32 (0.7.0) or above 126 (1.1.6) are escaped as “\\xXX”. If the variable value is not found, a hyphen (“-”) will be logged. For json escaping, all characters not allowed in JSON strings will be escaped: characters “\u0026#34;” and “\\” are escaped as “\\\u0026#34;” and “\\\\”, characters with values less than 32 are escaped as “\\n”, “\\r”, “\\t”, “\\b”, “\\f”, or “\\u00XX”. The log format can contain common variables, and variables that exist only at the time of a log write: $bytes_sent the number of bytes sent to a client $connection connection serial number $connection_requests the current number of requests made through a connection (1.1.18) $msec time in seconds with a milliseconds resolution at the time of the log write $pipe “p” if request was pipelined, “.” otherwise $request_length request length (including request line, header, and request body) $request_time request processing time in seconds with a milliseconds resolution; time elapsed between the first bytes were read from the client and the log write after the last bytes were sent to the client $status response status $time_iso8601 local time in the ISO 8601 standard format $time_local local time in the Common Log Format In the modern nginx versions variables $status (1.3.2, 1.2.2), $bytes_sent (1.3.8, 1.2.5), $connection (1.3.8, 1.2.5), $connection_requests (1.3.8, 1.2.5), $msec (1.3.9, 1.2.6), $request_time (1.3.9, 1.2.6), $pipe (1.3.12, 1.2.7), $request_length (1.3.12, 1.2.7), $time_iso8601 (1.3.12, 1.2.7), and $time_local (1.3.12, 1.2.7) are also available as common variables. Header lines sent to a client have the prefix “sent_http_”, for example, $sent_http_content_range. The configuration always includes the predefined “combined” format: log_format combined \u0026#39;$remote_addr - $remote_user [$time_local] \u0026#39; \u0026#39;\u0026#34;$request\u0026#34; $status $body_bytes_sent \u0026#39; \u0026#39;\u0026#34;$http_referer\u0026#34; \u0026#34;$http_user_agent\u0026#34;\u0026#39;; References NGINX Module ngx_http_log_module NGINX Module ngx_http_core_module NGINX Module ngx_http_realip_module Couldflare: Restoring original visitor IPs ","excerpt":"Problem If you have an Nginx server receiving requests from a proxy or behind a CDN, how can you …","ref":"https://djangocas.dev/blog/nginx/nginx-access-log-with-real-x-forwarded-for-ip-instead-of-proxy-ip/","title":"NGINX access_log log the real client IP from X-Forwarded-For/X-Real-IP/cf-connecting-ip instead of the proxy IP"},{"body":"Introduce crypto and ChunkedStreamReader crypto Flutter crypto package provides a set of cryptographic hashing functions implemented in pure Dart.\nThe following hashing algorithms are supported:\n SHA-1 SHA-224 SHA-256 SHA-384 SHA-512 SHA-512/224 SHA-512/256 MD5 HMAC (i.e. HMAC-MD5, HMAC-SHA1, HMAC-SHA256) crypto package already provide sample code to calculate hash through from bytes.\nSHA-1 SHA-256 SHA-512 on bytes Sample code to calculate SHA-256 hash for a short string. The idea is first convert string to bytes, then invoke the convert() method on the sha1, sha256 or sha512 objects:\nimport \u0026#39;package:crypto/crypto.dart\u0026#39;; import \u0026#39;dart:convert\u0026#39;; // for the utf8.encode method void main() { final bytes = utf8.encode(\u0026#34;Hello, world.\u0026#34;); // data being hashed final digest = sha256.convert(bytes); print(\u0026#34;Digest as bytes: ${digest.bytes}\u0026#34;); print(\u0026#34;Digest as hex string: $digest\u0026#34;); } If the input string is very long, may calculate hash incrementally through chunked input:\nimport \u0026#39;dart:convert\u0026#39;; import \u0026#39;package:convert/convert.dart\u0026#39;; import \u0026#39;package:crypto/crypto.dart\u0026#39;; void main() { var firstChunk = utf8.encode(\u0026#34;foo\u0026#34;); var secondChunk = utf8.encode(\u0026#34;bar\u0026#34;); var output = AccumulatorSink\u0026lt;Digest\u0026gt;(); var input = sha1.startChunkedConversion(output); input.add(firstChunk); input.add(secondChunk); // call `add` for every chunk of input data input.close(); final digest = output.events.single; print(\u0026#34;Digest as bytes: ${digest.bytes}\u0026#34;); print(\u0026#34;Digest as hex string: $digest\u0026#34;); } HMAC Flutter also support calculate HMAC (Hash-based Message Authentication Codes).\nHMAC is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key. As with any MAC, it may be used to simultaneously verify both the data integrity and authenticity of a message.\nThere is an example calculate HMAC in Flutter:\nimport \u0026#39;dart:convert\u0026#39;; import \u0026#39;package:crypto/crypto.dart\u0026#39;; void main() { final key = utf8.encode(\u0026#39;hash password\u0026#39;); final bytes = utf8.encode(\u0026#34;some text here...\u0026#34;); final hmacSha256 = Hmac(sha256, key); // HMAC-SHA256 final digest = hmacSha256.convert(bytes); print(\u0026#34;HMAC digest as bytes: ${digest.bytes}\u0026#34;); print(\u0026#34;HMAC digest as hex string: $digest\u0026#34;); } Flutter ChunkedStreamReader To calculate file hash, we need read file to bytes. To support large file, we should read file by chunk and calculate its hash incrementally.\nFlutter async package contains utility classes in the style of dart:async to work with asynchronous computations. Flutter async package provides ChunkedStreamReader utility class for reading chunks from a file stream. A chunked stream is a stream where each event is a chunk of elements. This utility class makes it easy to read a chunked stream using custom chunk sizes and sub-stream sizes, without managing partially read chunks.\nSample code to calculate file sha256 hash Put crypto and async together, an example of calculate file sha256 hash as below. This code can support large file because it calculate hash chunk by chunk, each chunk is 4KB.\nsha1, sha384 and sha512 is similar, just replace sha256 with sha1, sha384 or sha512.\nimport \u0026#39;package:async/async.dart\u0026#39;; import \u0026#39;dart:io\u0026#39;; import \u0026#39;package:crypto/crypto.dart\u0026#39;; import \u0026#39;package:convert/convert.dart\u0026#39;; Future\u0026lt;Digest\u0026gt; getFileSha256(String path) async { final reader = ChunkedStreamReader(File(path).openRead()); const chunkSize = 4096; var output = AccumulatorSink\u0026lt;Digest\u0026gt;(); var input = sha256.startChunkedConversion(output); try { while (true) { final chunk = await reader.readChunk(chunkSize); if (chunk.isEmpty) { // indicate end of file break; } input.add(chunk); } } finally { // We always cancel the ChunkedStreamReader, // this ensures the underlying stream is cancelled. reader.cancel(); } input.close(); return output.events.single; } Notes:\n The read-operations readChunk must not be invoked until the future from a previous call has completed. Return Digest so we can easily convert to bytes, hex or base64 encoded string. Example of getFileSha256 Get file hash in hex string Just use result of Digest.toString() to get hexadecimal digits.\nfinal hash = await getFileSha256(path); print(\u0026#34;sha256 hash hex in lowercase: ${hash.toString()}\u0026#34;); Get file hash in base64 url safe encode Hash result Digest.bytes can be encode with base64Url to get base64 url safe encoding:\nfinal hash = await getFileSha256(path); final hashBase64UrlSafe = base64Url.encode(hash.bytes); print(\u0026#34;sha256 hash base64 url safe: $hashBase64UrlSafe\u0026#34;); References crypto package Flutter async package ChunkedStreamReader reference ","excerpt":"Introduce crypto and ChunkedStreamReader crypto Flutter crypto package provides a set of …","ref":"https://djangocas.dev/blog/flutter/calculate-file-crypto-hash-sha1-sha256-sha512/","title":"Calculate file crypto hash (sha1, sha256, sha384 and sha512) in Flutter"},{"body":"If you want to test server TLS/SSL and have following requirements:\n Want to use command line to test server TLS/SSL config properly, scan TLS/SSL vulnerabilities. Want to run TLS/SSL test in CI (Continue Integration) environment. Want to output result as HTML/JSON/CSV format. Do not want to use Qualys SSL Labs SSL Server test for privacy concern. testssl.sh is a free and open source command line tool which checks a server\u0026rsquo;s support of TLS/SSL ciphers, protocols as well as recent cryptographic flaws and more.\ntestssl.sh key features Works for multiple platforms: Linux, Mac OSX, FreeBSD, NetBSD and WSL/MSYS2/Cygwin. bash is required. Docker image is ready to use. docker run --rm -ti drwetter/testssl.sh. Flexibility: You can test any SSL/TLS enabled and STARTTLS service, not only webservers at port 443. Toolbox: Several command line options help you to run your test and configure your output to HTML/JSON/CSV format. Reliability: features are tested thoroughly. Verbosity: If a particular check cannot be performed because of a missing capability on your client side, you\u0026rsquo;ll get a warning. Privacy: It\u0026rsquo;s only you who sees the result, not a third party. Freedom: It\u0026rsquo;s 100% open source on github. Test vulnerabilities testssl.sh support following vulnerabilities detection:\n Heartbleed (CVE-2014-0160) CCS (CVE-2014-0224) Ticketbleed (CVE-2016-9244), experiment. ROBOT Secure Renegotiation (RFC 5746) Secure Client-Initiated Renegotiation CRIME, TLS (CVE-2012-4929) BREACH (CVE-2013-3587) POODLE, SSL (CVE-2014-3566) TLS_FALLBACK_SCSV (RFC 7507) SWEET32 (CVE-2016-2183, CVE-2016-6329) FREAK (CVE-2015-0204) DROWN (CVE-2016-0800, CVE-2016-0703) LOGJAM (CVE-2015-4000), experimental BEAST (CVE-2011-3389) LUCKY13 (CVE-2013-0169), experimental Winshock (CVE-2014-6321), experimental RC4 (CVE-2013-2566, CVE-2015-2808) Install Mac OS X use homebrew:\nbrew install testssl For linux distributions, search testssl in its own package manager.\ne.g. Install testssl.sh on Debian:\nsudo apt-get install -y testssl.sh The easiest way is not install it locally, use docker image to always keep up to date. see docker command as below.\nSample Usage Test website TLS/SSL config and vulnerabilities The easiest way to use testssl.sh test a website TLS/SSL config and vulnerabilities just need website domain name. It will test all configurations and scan all the known vulnerabilities.\nHint Options requiring a value can also be called with \u0026lsquo;=\u0026rsquo; e.g. testssl.sh -t=smtp --wide --openssl=/usr/bin/openssl \u0026lt;URI\u0026gt;.\n \u0026lt;URI\u0026gt; always needs to be the last parameter.\n The following command use https://www.example.com as an example:\n$ docker run --rm drwetter/testssl.sh https://www.example.com ########################################################### testssl.sh 3.1dev from https://testssl.sh/dev/ This program is free software. Distribution and modification under GPLv2 permitted. USAGE w/o ANY WARRANTY. USE IT AT YOUR OWN RISK! Please file bugs @ https://testssl.sh/bugs/ ########################################################### Using \u0026#34;OpenSSL 1.0.2-chacha (1.0.2k-dev)\u0026#34; [~183 ciphers] on 68d47b2e5ecd:/home/testssl/bin/openssl.Linux.x86_64 (built: \u0026#34;Jan 18 17:12:17 2019\u0026#34;, platform: \u0026#34;linux-x86_64\u0026#34;) Further IP addresses: 2606:2800:220:1:248:1893:25c8:1946 rDNS (93.184.216.34): -- Service detected: HTTP Testing protocols via sockets except NPN+ALPN SSLv2 not offered (OK) SSLv3 not offered (OK) TLS 1 offered (deprecated) TLS 1.1 offered (deprecated) TLS 1.2 offered (OK) TLS 1.3 offered (OK): final NPN/SPDY h2, http/1.1, http/1.0 (advertised) ALPN/HTTP2 h2, http/1.1 (offered) Testing cipher categories NULL ciphers (no encryption) not offered (OK) Anonymous NULL Ciphers (no authentication) not offered (OK) Export ciphers (w/o ADH+NULL) not offered (OK) LOW: 64 Bit + DES, RC[2,4], MD5 (w/o export) not offered (OK) Triple DES Ciphers / IDEA not offered Obsoleted CBC ciphers (AES, ARIA etc.) offered Strong encryption (AEAD ciphers) with no FS offered (OK) Forward Secrecy strong encryption (AEAD ciphers) offered (OK) Testing server\u0026#39;s cipher preferences Has server cipher order? yes (OK) -- TLS 1.3 and below Negotiated protocol TLSv1.3 Negotiated cipher TLS_AES_256_GCM_SHA384, 256 bit ECDH (P-256) Cipher per protocol Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits Cipher Suite Name (IANA/RFC) ----------------------------------------------------------------------------------------------------------------------------- SSLv2 - SSLv3 - TLSv1 (server order) xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA x33 DHE-RSA-AES128-SHA DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA x39 DHE-RSA-AES256-SHA DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA x88 DHE-RSA-CAMELLIA256-SHA DH 2048 Camellia 256 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA x45 DHE-RSA-CAMELLIA128-SHA DH 2048 Camellia 128 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA x35 AES256-SHA RSA AES 256 TLS_RSA_WITH_AES_256_CBC_SHA x84 CAMELLIA256-SHA RSA Camellia 256 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA x2f AES128-SHA RSA AES 128 TLS_RSA_WITH_AES_128_CBC_SHA x41 CAMELLIA128-SHA RSA Camellia 128 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA x9a DHE-RSA-SEED-SHA DH 2048 SEED 128 TLS_DHE_RSA_WITH_SEED_CBC_SHA x96 SEED-SHA RSA SEED 128 TLS_RSA_WITH_SEED_CBC_SHA TLSv1.1 (server order) xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA x33 DHE-RSA-AES128-SHA DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA x39 DHE-RSA-AES256-SHA DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA x88 DHE-RSA-CAMELLIA256-SHA DH 2048 Camellia 256 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA x45 DHE-RSA-CAMELLIA128-SHA DH 2048 Camellia 128 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA x35 AES256-SHA RSA AES 256 TLS_RSA_WITH_AES_256_CBC_SHA x84 CAMELLIA256-SHA RSA Camellia 256 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA x2f AES128-SHA RSA AES 128 TLS_RSA_WITH_AES_128_CBC_SHA x41 CAMELLIA128-SHA RSA Camellia 128 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA x9a DHE-RSA-SEED-SHA DH 2048 SEED 128 TLS_DHE_RSA_WITH_SEED_CBC_SHA x96 SEED-SHA RSA SEED 128 TLS_RSA_WITH_SEED_CBC_SHA TLSv1.2 (server order) xc02f ECDHE-RSA-AES128-GCM-SHA256 ECDH 256 AESGCM 128 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 xc030 ECDHE-RSA-AES256-GCM-SHA384 ECDH 256 AESGCM 256 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 x9e DHE-RSA-AES128-GCM-SHA256 DH 2048 AESGCM 128 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 x9f DHE-RSA-AES256-GCM-SHA384 DH 2048 AESGCM 256 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 xc027 ECDHE-RSA-AES128-SHA256 ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA xc028 ECDHE-RSA-AES256-SHA384 ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA x67 DHE-RSA-AES128-SHA256 DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 x33 DHE-RSA-AES128-SHA DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA x6b DHE-RSA-AES256-SHA256 DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 x39 DHE-RSA-AES256-SHA DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA x9c AES128-GCM-SHA256 RSA AESGCM 128 TLS_RSA_WITH_AES_128_GCM_SHA256 x88 DHE-RSA-CAMELLIA256-SHA DH 2048 Camellia 256 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA x45 DHE-RSA-CAMELLIA128-SHA DH 2048 Camellia 128 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA x35 AES256-SHA RSA AES 256 TLS_RSA_WITH_AES_256_CBC_SHA x84 CAMELLIA256-SHA RSA Camellia 256 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA x2f AES128-SHA RSA AES 128 TLS_RSA_WITH_AES_128_CBC_SHA x41 CAMELLIA128-SHA RSA Camellia 128 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA x9a DHE-RSA-SEED-SHA DH 2048 SEED 128 TLS_DHE_RSA_WITH_SEED_CBC_SHA x96 SEED-SHA RSA SEED 128 TLS_RSA_WITH_SEED_CBC_SHA TLSv1.3 (server order) x1302 TLS_AES_256_GCM_SHA384 ECDH 256 AESGCM 256 TLS_AES_256_GCM_SHA384 x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH 256 ChaCha20 256 TLS_CHACHA20_POLY1305_SHA256 x1301 TLS_AES_128_GCM_SHA256 ECDH 256 AESGCM 128 TLS_AES_128_GCM_SHA256 Testing robust forward secrecy (FS) -- omitting Null Authentication/Encryption, 3DES, RC4 FS is offered (OK) TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-SHA384 ECDHE-RSA-AES256-SHA DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA256 DHE-RSA-AES256-SHA DHE-RSA-CAMELLIA256-SHA TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES128-SHA256 DHE-RSA-AES128-SHA DHE-RSA-SEED-SHA DHE-RSA-CAMELLIA128-SHA Elliptic curves offered: prime256v1 DH group offered: Unknown DH group (2048 bits) Testing server defaults (Server Hello) TLS extensions (standard) \u0026#34;renegotiation info/#65281\u0026#34; \u0026#34;EC point formats/#11\u0026#34; \u0026#34;session ticket/#35\u0026#34; \u0026#34;status request/#5\u0026#34; \u0026#34;next protocol/#13172\u0026#34; \u0026#34;supported versions/#43\u0026#34; \u0026#34;key share/#51\u0026#34; \u0026#34;max fragment length/#1\u0026#34; \u0026#34;application layer protocol negotiation/#16\u0026#34; \u0026#34;encrypt-then-mac/#22\u0026#34; \u0026#34;extended master secret/#23\u0026#34; Session Ticket RFC 5077 hint 7200 seconds, session tickets keys seems to be rotated \u0026lt; daily SSL Session ID support yes Session Resumption Tickets no, ID: no TLS clock skew Random values, no fingerprinting possible Certificate Compression none Client Authentication none Signature Algorithm SHA256 with RSA Server key size RSA 2048 bits (exponent is 65537) Server key usage Digital Signature, Key Encipherment Server extended key usage TLS Web Server Authentication, TLS Web Client Authentication Serial / Fingerprints 025216E1C4998E2632AA5D1DA985B43C / SHA1 A4C3D451DE3F534F7FA42E620AAD501B528940F5 SHA256 61E56F95929E3F4CFFDC250DC4D9C9BCEEDDD8D9C1886ACB84B45BF39B60C002 Common Name (CN) www.example.org subjectAltName (SAN) www.example.org example.net example.edu example.com example.org www.example.com www.example.edu www.example.net Trust (hostname) Ok via SAN (same w/o SNI) Chain of trust Ok EV cert (experimental) no Certificate Validity (UTC) 354 \u0026gt;= 60 days (2021-12-10 00:00 --\u0026gt; 2022-12-09 23:59) ETS/\u0026#34;eTLS\u0026#34;, visibility info not present Certificate Revocation List http://crl3.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl http://crl4.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl OCSP URI http://ocsp.digicert.com OCSP stapling offered, not revoked OCSP must staple extension -- DNS CAA RR (experimental) not offered Certificate Transparency yes (certificate extension) Certificates provided 2 Issuer DigiCert TLS RSA SHA256 2020 CA1 (DigiCert Inc from US) Intermediate cert validity #1: ok \u0026gt; 40 days (2031-04-13 23:59). DigiCert TLS RSA SHA256 2020 CA1 \u0026lt;-- DigiCert Global Root CA Intermediate Bad OCSP (exp.) Ok Testing HTTP header response @ \u0026#34;/\u0026#34; HTTP Status Code 200 OK HTTP clock skew 0 sec from localtime Strict Transport Security not offered Public Key Pinning -- Server banner ECS (agb/5295) Application banner -- Cookie(s) (none issued at \u0026#34;/\u0026#34;) Security headers Cache-Control: max-age=604800 Reverse Proxy banner X-Cache: HIT Testing vulnerabilities Heartbleed (CVE-2014-0160) not vulnerable (OK), no heartbeat extension CCS (CVE-2014-0224) not vulnerable (OK) Ticketbleed (CVE-2016-9244), experiment. not vulnerable (OK) ROBOT not vulnerable (OK) Secure Renegotiation (RFC 5746) supported (OK) Secure Client-Initiated Renegotiation not vulnerable (OK) CRIME, TLS (CVE-2012-4929) not vulnerable (OK) BREACH (CVE-2013-3587) potentially NOT ok, \u0026#34;gzip deflate\u0026#34; HTTP compression detected. - only supplied \u0026#34;/\u0026#34; tested Can be ignored for static pages or if no secrets in the page POODLE, SSL (CVE-2014-3566) not vulnerable (OK), no SSLv3 support TLS_FALLBACK_SCSV (RFC 7507) Downgrade attack prevention supported (OK) SWEET32 (CVE-2016-2183, CVE-2016-6329) not vulnerable (OK) FREAK (CVE-2015-0204) not vulnerable (OK) DROWN (CVE-2016-0800, CVE-2016-0703) not vulnerable on this host and port (OK) make sure you don\u0026#39;t use this certificate elsewhere with SSLv2 enabled services https://censys.io/ipv4?q=61E56F95929E3F4CFFDC250DC4D9C9BCEEDDD8D9C1886ACB84B45BF39B60C002 could help you to find out LOGJAM (CVE-2015-4000), experimental not vulnerable (OK): no DH EXPORT ciphers, no common prime detected BEAST (CVE-2011-3389) TLS1: ECDHE-RSA-AES128-SHA ECDHE-RSA-AES256-SHA DHE-RSA-AES128-SHA DHE-RSA-AES256-SHA DHE-RSA-CAMELLIA256-SHA DHE-RSA-CAMELLIA128-SHA AES256-SHA CAMELLIA256-SHA AES128-SHA CAMELLIA128-SHA DHE-RSA-SEED-SHA SEED-SHA VULNERABLE -- but also supports higher protocols TLSv1.1 TLSv1.2 (likely mitigated) LUCKY13 (CVE-2013-0169), experimental potentially VULNERABLE, uses cipher block chaining (CBC) ciphers with TLS. Check patches Winshock (CVE-2014-6321), experimental not vulnerable (OK) RC4 (CVE-2013-2566, CVE-2015-2808) no RC4 ciphers detected (OK) Running client simulations (HTTP) via sockets Browser Protocol Cipher Suite Name (OpenSSL) Forward Secrecy ------------------------------------------------------------------------------------------------ Android 4.4.2 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Android 5.0.0 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Android 6.0 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Android 7.0 (native) TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Android 8.1 (native) TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Android 9.0 (native) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Android 10.0 (native) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Chrome 74 (Win 10) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Chrome 79 (Win 10) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Firefox 66 (Win 8.1/10) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Firefox 71 (Win 10) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) IE 6 XP No connection IE 8 Win 7 TLSv1.0 ECDHE-RSA-AES128-SHA 256 bit ECDH (P-256) IE 8 XP No connection IE 11 Win 7 TLSv1.2 DHE-RSA-AES128-GCM-SHA256 2048 bit DH IE 11 Win 8.1 TLSv1.2 DHE-RSA-AES128-GCM-SHA256 2048 bit DH IE 11 Win Phone 8.1 TLSv1.2 ECDHE-RSA-AES128-SHA256 256 bit ECDH (P-256) IE 11 Win 10 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Edge 15 Win 10 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Edge 17 (Win 10) TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Opera 66 (Win 10) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Safari 9 iOS 9 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Safari 9 OS X 10.11 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Safari 10 OS X 10.12 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Safari 12.1 (iOS 12.2) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Safari 13.0 (macOS 10.14.6) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Apple ATS 9 iOS 9 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Java 6u45 No connection Java 7u25 TLSv1.0 ECDHE-RSA-AES128-SHA 256 bit ECDH (P-256) Java 8u161 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) Java 11.0.2 (OpenJDK) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Java 12.0.1 (OpenJDK) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) OpenSSL 1.0.2e TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) OpenSSL 1.1.0l (Debian) TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 256 bit ECDH (P-256) OpenSSL 1.1.1d (Debian) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Thunderbird (68.3) TLSv1.3 TLS_AES_256_GCM_SHA384 256 bit ECDH (P-256) Rating (experimental) Rating specs (not complete) SSL Labs\u0026#39;s \u0026#39;SSL Server Rating Guide\u0026#39; (version 2009q from 2020-01-30) Specification documentation https://github.com/ssllabs/research/wiki/SSL-Server-Rating-Guide Protocol Support (weighted) 95 (28) Key Exchange (weighted) 90 (27) Cipher Strength (weighted) 90 (36) Final Score 91 Overall Grade B Grade cap reasons Grade capped to B. TLS 1.1 offered Grade capped to B. TLS 1.0 offered Grade capped to A. HSTS is not offered Generate JSON/CSV/HTML output Use --jsonfile, --csvfile and --htmlfile to generate JSON, CSV and HTML output.\nExample:\n# Generate JSON output docker run --rm -v `pwd`:/mnt drwetter/testssl.sh --jsonfile=/mnt/report.json https://www.example.com # Generate CSV output docker run --rm -v `pwd`:/mnt drwetter/testssl.sh --csvfile=/mnt/report.csv https://www.example.com # Generate HTML output docker run --rm -v `pwd`:/mnt drwetter/testssl.sh --htmlfile=/mnt/report.html https://www.example.com You can also generate multiple report at the same time. For example, the follow command generate JSON, CSV and HTML outputs:\ndocker run --rm -v `pwd`:/mnt drwetter/testssl.sh --htmlfile=/mnt/report.html --jsonfile=/mnt/report.json --csvfile=/mnt/report.csv https://www.example.com Note By default, if the output file already exist, testssl.sh will not override it and command will fail with an error, like following error message:\nFatal error: non-empty \u0026#34;/mnt/report.json\u0026#34; exists. Either use \u0026#34;--append\u0026#34; or (re)move it In this case, you need rename exist output file or delete it.\n Test server default config Use -S, --server-defaults to displays the server\u0026rsquo;s default picks and certificate info:\n$ docker run --rm drwetter/testssl.sh -S https://www.example.com ... Testing server defaults (Server Hello) TLS extensions (standard) \u0026#34;renegotiation info/#65281\u0026#34; \u0026#34;EC point formats/#11\u0026#34; \u0026#34;session ticket/#35\u0026#34; \u0026#34;status request/#5\u0026#34; \u0026#34;next protocol/#13172\u0026#34; \u0026#34;supported versions/#43\u0026#34; \u0026#34;key share/#51\u0026#34; \u0026#34;max fragment length/#1\u0026#34; \u0026#34;application layer protocol negotiation/#16\u0026#34; \u0026#34;encrypt-then-mac/#22\u0026#34; \u0026#34;extended master secret/#23\u0026#34; Session Ticket RFC 5077 hint 7200 seconds, session tickets keys seems to be rotated \u0026lt; daily SSL Session ID support yes Session Resumption Tickets no, ID: no TLS clock skew Random values, no fingerprinting possible Certificate Compression none Client Authentication none Signature Algorithm SHA256 with RSA Server key size RSA 2048 bits (exponent is 65537) Server key usage Digital Signature, Key Encipherment Server extended key usage TLS Web Server Authentication, TLS Web Client Authentication Serial / Fingerprints 025216E1C4998E2632AA5D1DA985B43C / SHA1 A4C3D451DE3F534F7FA42E620AAD501B528940F5 SHA256 61E56F95929E3F4CFFDC250DC4D9C9BCEEDDD8D9C1886ACB84B45BF39B60C002 Common Name (CN) www.example.org subjectAltName (SAN) www.example.org example.net example.edu example.com example.org www.example.com www.example.edu www.example.net Trust (hostname) Ok via SAN (same w/o SNI) Chain of trust Ok EV cert (experimental) no Certificate Validity (UTC) 354 \u0026gt;= 60 days (2021-12-10 00:00 --\u0026gt; 2022-12-09 23:59) ETS/\u0026#34;eTLS\u0026#34;, visibility info not present Certificate Revocation List http://crl3.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl http://crl4.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl OCSP URI http://ocsp.digicert.com OCSP stapling offered, not revoked OCSP must staple extension -- DNS CAA RR (experimental) not offered Certificate Transparency yes (certificate extension) Certificates provided 2 Issuer DigiCert TLS RSA SHA256 2020 CA1 (DigiCert Inc from US) Intermediate cert validity #1: ok \u0026gt; 40 days (2031-04-13 23:59). DigiCert TLS RSA SHA256 2020 CA1 \u0026lt;-- DigiCert Global Root CA Intermediate Bad OCSP (exp.) Ok Test server prefer protocol+cipher suites Use -P, --server-preference to displays the server\u0026rsquo;s prefer protocol+cipher:\n$ docker run --rm drwetter/testssl.sh --server-preference https://www.example.com ... Testing server\u0026#39;s cipher preferences Has server cipher order? yes (OK) -- TLS 1.3 and below Negotiated protocol TLSv1.3 Negotiated cipher TLS_AES_256_GCM_SHA384, 256 bit ECDH (P-256) Cipher per protocol Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits Cipher Suite Name (IANA/RFC) ----------------------------------------------------------------------------------------------------------------------------- SSLv2 (listed by strength) - SSLv3 (server order) - TLSv1 (server order) xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA x33 DHE-RSA-AES128-SHA DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA x39 DHE-RSA-AES256-SHA DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA x88 DHE-RSA-CAMELLIA256-SHA DH 2048 Camellia 256 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA x45 DHE-RSA-CAMELLIA128-SHA DH 2048 Camellia 128 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA x35 AES256-SHA RSA AES 256 TLS_RSA_WITH_AES_256_CBC_SHA x84 CAMELLIA256-SHA RSA Camellia 256 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA x2f AES128-SHA RSA AES 128 TLS_RSA_WITH_AES_128_CBC_SHA x41 CAMELLIA128-SHA RSA Camellia 128 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA x9a DHE-RSA-SEED-SHA DH 2048 SEED 128 TLS_DHE_RSA_WITH_SEED_CBC_SHA x96 SEED-SHA RSA SEED 128 TLS_RSA_WITH_SEED_CBC_SHA TLSv1.1 (server order) xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA x33 DHE-RSA-AES128-SHA DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA x39 DHE-RSA-AES256-SHA DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA x88 DHE-RSA-CAMELLIA256-SHA DH 2048 Camellia 256 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA x45 DHE-RSA-CAMELLIA128-SHA DH 2048 Camellia 128 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA x35 AES256-SHA RSA AES 256 TLS_RSA_WITH_AES_256_CBC_SHA x84 CAMELLIA256-SHA RSA Camellia 256 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA x2f AES128-SHA RSA AES 128 TLS_RSA_WITH_AES_128_CBC_SHA x41 CAMELLIA128-SHA RSA Camellia 128 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA x9a DHE-RSA-SEED-SHA DH 2048 SEED 128 TLS_DHE_RSA_WITH_SEED_CBC_SHA x96 SEED-SHA RSA SEED 128 TLS_RSA_WITH_SEED_CBC_SHA TLSv1.2 (server order) xc02f ECDHE-RSA-AES128-GCM-SHA256 ECDH 256 AESGCM 128 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 xc030 ECDHE-RSA-AES256-GCM-SHA384 ECDH 256 AESGCM 256 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 x9e DHE-RSA-AES128-GCM-SHA256 DH 2048 AESGCM 128 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 x9f DHE-RSA-AES256-GCM-SHA384 DH 2048 AESGCM 256 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 xc027 ECDHE-RSA-AES128-SHA256 ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA xc028 ECDHE-RSA-AES256-SHA384 ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA x67 DHE-RSA-AES128-SHA256 DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 x33 DHE-RSA-AES128-SHA DH 2048 AES 128 TLS_DHE_RSA_WITH_AES_128_CBC_SHA x6b DHE-RSA-AES256-SHA256 DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 x39 DHE-RSA-AES256-SHA DH 2048 AES 256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA x9c AES128-GCM-SHA256 RSA AESGCM 128 TLS_RSA_WITH_AES_128_GCM_SHA256 x88 DHE-RSA-CAMELLIA256-SHA DH 2048 Camellia 256 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA x45 DHE-RSA-CAMELLIA128-SHA DH 2048 Camellia 128 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA x35 AES256-SHA RSA AES 256 TLS_RSA_WITH_AES_256_CBC_SHA x84 CAMELLIA256-SHA RSA Camellia 256 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA x2f AES128-SHA RSA AES 128 TLS_RSA_WITH_AES_128_CBC_SHA x41 CAMELLIA128-SHA RSA Camellia 128 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA x9a DHE-RSA-SEED-SHA DH 2048 SEED 128 TLS_DHE_RSA_WITH_SEED_CBC_SHA x96 SEED-SHA RSA SEED 128 TLS_RSA_WITH_SEED_CBC_SHA TLSv1.3 (server order) x1302 TLS_AES_256_GCM_SHA384 ECDH 256 AESGCM 256 TLS_AES_256_GCM_SHA384 x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH 256 ChaCha20 256 TLS_CHACHA20_POLY1305_SHA256 x1301 TLS_AES_128_GCM_SHA256 ECDH 256 AESGCM 128 TLS_AES_128_GCM_SHA256 testssl.sh usage quick reference Use --help to get all the available command line options:\n$ docker run --rm drwetter/testssl.sh --help \u0026#34;testssl.sh [options] \u0026lt;URI\u0026gt;\u0026#34; or \u0026#34;testssl.sh \u0026lt;options\u0026gt;\u0026#34; \u0026#34;testssl.sh \u0026lt;option\u0026gt;\u0026#34;, where \u0026lt;option\u0026gt; is mostly standalone and one of: --help what you\u0026#39;re looking at -b, --banner displays banner + version of testssl.sh -v, --version same as previous -V, --local [pattern] pretty print all local ciphers (of openssl only). If search pattern supplied: it is an an ignore case word pattern of cipher hexcode or any other string in its name, kx or bits \u0026#34;testssl.sh [options] \u0026lt;URI\u0026gt;\u0026#34;, where \u0026lt;URI\u0026gt; is: \u0026lt;URI\u0026gt; host|host:port|URL|URL:port port 443 is default, URL can only contain HTTPS as a protocol and [options] is/are: -t, --starttls \u0026lt;protocol\u0026gt; Does a run against a STARTTLS enabled service which is one of ftp, smtp, lmtp, pop3, imap, xmpp, xmpp-server, telnet, ldap, nntp, postgres, mysql --xmpphost \u0026lt;to_domain\u0026gt; For STARTTLS xmpp or xmpp-server checks it supplies the domainname (like SNI) --mx \u0026lt;domain/host\u0026gt; Tests MX records from high to low priority (STARTTLS, port 25) --file/-iL \u0026lt;fname\u0026gt; Mass testing option: Reads one testssl.sh command line per line from \u0026lt;fname\u0026gt;. Can be combined with --serial or --parallel. Implicitly turns on \u0026#34;--warnings batch\u0026#34;. Text format 1: Comments via # allowed, EOF signals end of \u0026lt;fname\u0026gt; Text format 2: nmap output in greppable format (-oG), 1 port per line allowed --mode \u0026lt;serial|parallel\u0026gt; Mass testing to be done serial (default) or parallel (--parallel is shortcut for the latter) --warnings \u0026lt;batch|off\u0026gt; \u0026#34;batch\u0026#34; doesn\u0026#39;t continue when a testing error is encountered, off continues and skips warnings --connect-timeout \u0026lt;seconds\u0026gt; useful to avoid hangers. Max \u0026lt;seconds\u0026gt; to wait for the TCP socket connect to return --openssl-timeout \u0026lt;seconds\u0026gt; useful to avoid hangers. Max \u0026lt;seconds\u0026gt; to wait before openssl connect will be terminated single check as \u0026lt;options\u0026gt; (\u0026#34;testssl.sh URI\u0026#34; does everything except -E and -g): -e, --each-cipher checks each local cipher remotely -E, --cipher-per-proto checks those per protocol -s, --std, --categories tests standard cipher categories by strength -f, --fs, --nsa checks forward secrecy settings -p, --protocols checks TLS/SSL protocols (including SPDY/HTTP2) -g, --grease tests several server implementation bugs like GREASE and size limitations -S, --server-defaults displays the server\u0026#39;s default picks and certificate info -P, --server-preference displays the server\u0026#39;s picks: protocol+cipher -x, --single-cipher \u0026lt;pattern\u0026gt; tests matched \u0026lt;pattern\u0026gt; of ciphers (if \u0026lt;pattern\u0026gt; not a number: word match) -c, --client-simulation test client simulations, see which client negotiates with cipher and protocol -h, --header, --headers tests HSTS, HPKP, server/app banner, security headers, cookie, reverse proxy, IPv4 address -U, --vulnerable tests all (of the following) vulnerabilities (if applicable) -H, --heartbleed tests for Heartbleed vulnerability -I, --ccs, --ccs-injection tests for CCS injection vulnerability -T, --ticketbleed tests for Ticketbleed vulnerability in BigIP loadbalancers --BB, --robot tests for Return of Bleichenbacher\u0026#39;s Oracle Threat (ROBOT) vulnerability --SI, --starttls-injection tests for STARTTLS injection issues -R, --renegotiation tests for renegotiation vulnerabilities -C, --compression, --crime tests for CRIME vulnerability (TLS compression issue) -B, --breach tests for BREACH vulnerability (HTTP compression issue) -O, --poodle tests for POODLE (SSL) vulnerability -Z, --tls-fallback checks TLS_FALLBACK_SCSV mitigation -W, --sweet32 tests 64 bit block ciphers (3DES, RC2 and IDEA): SWEET32 vulnerability -A, --beast tests for BEAST vulnerability -L, --lucky13 tests for LUCKY13 -WS, --winshock tests for winshock vulnerability -F, --freak tests for FREAK vulnerability -J, --logjam tests for LOGJAM vulnerability -D, --drown tests for DROWN vulnerability -4, --rc4, --appelbaum which RC4 ciphers are being offered? tuning / connect options (most also can be preset via environment variables): --fast omits some checks: using openssl for all ciphers (-e), show only first preferred cipher. -9, --full includes tests for implementation bugs and cipher per protocol (could disappear) --bugs enables the \u0026#34;-bugs\u0026#34; option of s_client, needed e.g. for some buggy F5s --assume-http if protocol check fails it assumes HTTP protocol and enforces HTTP checks --ssl-native fallback to checks with OpenSSL where sockets are normally used --openssl \u0026lt;PATH\u0026gt; use this openssl binary (default: look in $PATH, $RUN_DIR of testssl.sh) --proxy \u0026lt;host:port|auto\u0026gt; (experimental) proxy connects via \u0026lt;host:port\u0026gt;, auto: values from $env ($http(s)_proxy) -6 also use IPv6. Works only with supporting OpenSSL version and IPv6 connectivity --ip \u0026lt;ip\u0026gt; a) tests the supplied \u0026lt;ip\u0026gt; v4 or v6 address instead of resolving host(s) in URI b) arg \u0026#34;one\u0026#34; means: just test the first DNS returns (useful for multiple IPs) -n, --nodns \u0026lt;min|none\u0026gt; if \u0026#34;none\u0026#34;: do not try any DNS lookups, \u0026#34;min\u0026#34; queries A, AAAA and MX records --sneaky leave less traces in target logs: user agent, referer --user-agent \u0026lt;user agent\u0026gt; set a custom user agent instead of the standard user agent --ids-friendly skips a few vulnerability checks which may cause IDSs to block the scanning IP --phone-out allow to contact external servers for CRL download and querying OCSP responder --add-ca \u0026lt;CA files|CA dir\u0026gt; path to \u0026lt;CAdir\u0026gt; with *.pem or a comma separated list of CA files to include in trust check --basicauth \u0026lt;user:pass\u0026gt; provide HTTP basic auth information. --reqheader \u0026lt;header\u0026gt; add custom http request headers output options (can also be preset via environment variables): --quiet don\u0026#39;t output the banner. By doing this you acknowledge usage terms normally appearing in the banner --wide wide output for tests like RC4, BEAST. FS also with hexcode, kx, strength, RFC name --show-each for wide outputs: display all ciphers tested -- not only succeeded ones --mapping \u0026lt;openssl| openssl: use the OpenSSL cipher suite name as the primary name cipher suite name form (default) iana|rfc -\u0026gt; use the IANA/(RFC) cipher suite name as the primary name cipher suite name form no-openssl| -\u0026gt; don\u0026#39;t display the OpenSSL cipher suite name, display IANA/(RFC) names only no-iana|no-rfc\u0026gt; -\u0026gt; don\u0026#39;t display the IANA/(RFC) cipher suite name, display OpenSSL names only --color \u0026lt;0|1|2|3\u0026gt; 0: no escape or other codes, 1: b/w escape codes, 2: color (default), 3: extra color (color all ciphers) --colorblind swap green and blue in the output --debug \u0026lt;0-6\u0026gt; 1: screen output normal but keeps debug output in /tmp/. 2-6: see \u0026#34;grep -A 5 \u0026#39;^DEBUG=\u0026#39; testssl.sh\u0026#34; --disable-rating Explicitly disables the rating output file output options (can also be preset via environment variables) --log, --logging logs stdout to \u0026#39;${NODE}-p${port}${YYYYMMDD-HHMM}.log\u0026#39; in current working directory (cwd) --logfile|-oL \u0026lt;logfile\u0026gt; logs stdout to \u0026#39;dir/${NODE}-p${port}${YYYYMMDD-HHMM}.log\u0026#39;. If \u0026#39;logfile\u0026#39; is a dir or to a specified \u0026#39;logfile\u0026#39; --json additional output of findings to flat JSON file \u0026#39;${NODE}-p${port}${YYYYMMDD-HHMM}.json\u0026#39; in cwd --jsonfile|-oj \u0026lt;jsonfile\u0026gt; additional output to the specified flat JSON file or directory, similar to --logfile --json-pretty additional JSON structured output of findings to a file \u0026#39;${NODE}-p${port}${YYYYMMDD-HHMM}.json\u0026#39; in cwd --jsonfile-pretty|-oJ \u0026lt;jsonfile\u0026gt; additional JSON structured output to the specified file or directory, similar to --logfile --csv additional output of findings to CSV file \u0026#39;${NODE}-p${port}${YYYYMMDD-HHMM}.csv\u0026#39; in cwd or directory --csvfile|-oC \u0026lt;csvfile\u0026gt; additional output as CSV to the specified file or directory, similar to --logfile --html additional output as HTML to file \u0026#39;${NODE}-p${port}${YYYYMMDD-HHMM}.html\u0026#39; --htmlfile|-oH \u0026lt;htmlfile\u0026gt; additional output as HTML to the specified file or directory, similar to --logfile --out(f,F)ile|-oa/-oA \u0026lt;fname\u0026gt; log to a LOG,JSON,CSV,HTML file (see nmap). -oA/-oa: pretty/flat JSON. \u0026#34;auto\u0026#34; uses \u0026#39;${NODE}-p${port}${YYYYMMDD-HHMM}\u0026#39;. If fname if a dir uses \u0026#39;dir/${NODE}-p${port}${YYYYMMDD-HHMM}\u0026#39; --hints additional hints to findings --severity \u0026lt;severity\u0026gt; severities with lower level will be filtered for CSV+JSON, possible values \u0026lt;LOW|MEDIUM|HIGH|CRITICAL\u0026gt; --append if (non-empty) \u0026lt;logfile\u0026gt;, \u0026lt;csvfile\u0026gt;, \u0026lt;jsonfile\u0026gt; or \u0026lt;htmlfile\u0026gt; exists, append to file. Omits any header --overwrite if \u0026lt;logfile\u0026gt;, \u0026lt;csvfile\u0026gt;, \u0026lt;jsonfile\u0026gt; or \u0026lt;htmlfile\u0026gt; exists it overwrites it without any warning --outprefix \u0026lt;fname_prefix\u0026gt; before \u0026#39;${NODE}.\u0026#39; above prepend \u0026lt;fname_prefix\u0026gt; Options requiring a value can also be called with \u0026#39;=\u0026#39; e.g. testssl.sh -t=smtp --wide --openssl=/usr/bin/openssl \u0026lt;URI\u0026gt;. \u0026lt;URI\u0026gt; always needs to be the last parameter. Related pages: Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security OpenSSL CSR Examples: Self Signed Certificate and How to Start Test TLS/SSL Server/Client ECDSA signature verify in kotlin and Golang Test TLS Connection Ciphers TLS Version and Certificate with OpenSSL Command Line Running a DoH Client to encrypt all home DNS traffic Secure Squid Proxy Server References testssl.sh testssl.sh on github Test TLS Connection Ciphers TLS Version and Certificate with OpenSSL Command Line ","excerpt":"If you want to test server TLS/SSL and have following requirements:\n Want to use command line to …","ref":"https://djangocas.dev/blog/security/testssl-command-line-tool-check-server-tls-ssl-ciphers-vulnerabilities/","title":"testssl.sh examples command line tool check server TLS/SSL (weak) ciphers and detect TLS/SSL vulnerabilities"},{"body":"Isso Introduction Isso is a Disqus alternative commenting server for static web sites. It is a lightweight commenting server written in Python and JavaScript. It aims to be a drop-in replacement for Disqus.\nThe benefits of Isso compare to Disqus:\n Smaller, javascript is 64kb compressed. faster loading speed compare to Disqus. You own your data. comments stored in your server sqlite3 database. No 3rd party code run on your site. 3rd party comment system can run whatever code on your site. Features Add/Reply/Like/Dislike comments. Comments written in Markdown Users can edit or delete own comments (within 15 minutes by default). Comments in moderation queue are not publicly visible before activation. anonymous comments privacy, not log exact IP Disqus \u0026amp; WordPress Import. You can migrate your Disqus/WordPress comments without any hassle. SQLite backend. Embed a single JS file, 65kB (20kB gzipped) and you are done. Supports Firefox, Safari, Chrome and IE10. Isso Setup To setup Isso, you need following:\n A server. If your site traffic is low, a very small server is enough. A domain name for Isso server. The first step is downloading the latest Isso source:\ngit clone https://github.com/posativ/isso.git The easy way is use docker to run Isso. Build docker image by docker build:\n$ docker build . -t isso $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE isso latest 1234b841c0ac 4 hours ago 139MB Then we need config Isso.\nThe Isso configuration file is an INI-style textfile. It reads integers, booleans, strings and lists.\nThe default isso configuration: isso.conf Here is my config:\n[general] ; database location, check permissions, ; automatically created if it does not exist dbpath = /db/isso_comments.db ; your website or blog (not the location of Isso!) host = https://yourdomain.tld/ [admin] ; admin interface in /admin enabled = true password = abc123 [guard] ; basic spam protection enabled = true ; limit to N new comments per minute. ratelimit = 5 ; how many comments directly to the thread direct-reply = 3 ; allow commenters to reply to their own comments when they could still edit the comment. reply-to-self = false require-author = false require-email = false Hints:\n dbpath and host is mandatory. dbpath is the full path of sqlite3 database. host is your site URL (include http:// or https://). It can have multiple values. config it correctly to avoid cross domain attack (CORS). Enable admin to manage comment through web interface. Enable guard to avoid spam. Create config and db directory to store config and database.\nmkdir -p config db Put config file to config/isso.cfg then run Isso in docker:\ndocker run -d --rm --name isso -p 127.0.0.1:8080:8080 -v `pwd`/config:/config -v `pwd`/db:/db isso Note: Do not run Isso on a public interface.\n Next step is config nginx to proxy traffic to Isso.\nAdd a nginx virtual server config /etc/nginx/sites-enabled/isso.conf like following:\n# # /etc/nginx/sites-enabled/isso.conf # server { server_name comments.yourdomain.tld; location / { proxy_pass http://localhost:8080; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; } } Then restart nginx:\nsudo systemctl restart nginx To test server is running by curl /admin, you should see HTTP 200 response:\n$ curl -I https://comments.yourdomain.tld/admin HTTP/2 200 Add comments to hugo Inside hugo content.html page, add following code at end of article to load isso.\n\u0026lt;div style=\u0026#34;max-width: 80%;\u0026#34;\u0026gt; \u0026lt;h3\u0026gt;Comments\u0026lt;/h3\u0026gt; \u0026lt;script data-isso=\u0026#34;//comments.yourdomain.tld/\u0026#34; src=\u0026#34;//comments.yourdomain.tld/js/embed.min.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;section id=\u0026#34;comments\u0026#34;\u0026gt;\u0026lt;/section\u0026gt; \u0026lt;/div\u0026gt; By default, isso make the comment center align, if you want to it left align, you can override its css like following:\n\u0026lt;div style=\u0026#34;max-width: 80%;\u0026#34;\u0026gt; \u0026lt;h3\u0026gt;Comments\u0026lt;/h3\u0026gt; \u0026lt;script data-isso=\u0026#34;//comments.yourdomain.tld/\u0026#34; src=\u0026#34;//comments.yourdomain.tld/js/embed.min.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;style\u0026gt; .isso-postbox { margin: 0 !important; max-width: none !important; } #isso-root .isso-comment { max-width: none !important; margin: 0 !important; } \u0026lt;/style\u0026gt; \u0026lt;section id=\u0026#34;comments\u0026#34;\u0026gt;\u0026lt;/section\u0026gt; \u0026lt;/div\u0026gt; That\u0026rsquo;s it. Hugo have a comment system powered by Isso.\nIsso Internal API Isso provide JSON API:\n GET /?uri= fetch comments for uri. POST /preview Preview post. POST /new Create new comment. GET /id/\u0026lt;id\u0026gt; Get comment by id. PUT /id/\u0026lt;id\u0026gt; Delete comment by id. DELETE /id/\u0026lt;id\u0026gt; Delete comment by id. POST /id/\u0026lt;id\u0026gt;/like Like. POST /id/\u0026lt;id\u0026gt;/dislike Dislike. Database Isso use sqlite3 as database. There are three tables in database:\n comments preferences threads Table schema:\nsqlite\u0026gt; .schema comments CREATE TABLE comments ( tid REFERENCES threads(id), id INTEGER PRIMARY KEY, parent INTEGER, created FLOAT NOT NULL, modified FLOAT, mode INTEGER, remote_addr VARCHAR, text VARCHAR, author VARCHAR, email VARCHAR, website VARCHAR, likes INTEGER DEFAULT 0, dislikes INTEGER DEFAULT 0, voters BLOB NOT NULL, notification INTEGER DEFAULT 0 ); CREATE TRIGGER remove_stale_threads AFTER DELETE ON comments BEGIN DELETE FROM threads WHERE id NOT IN (SELECT tid FROM comments); END; sqlite\u0026gt; .schema threads CREATE TABLE threads ( id INTEGER PRIMARY KEY, uri VARCHAR(256) UNIQUE, title VARCHAR(256) ); sqlite\u0026gt; .schema preferences CREATE TABLE preferences ( key VARCHAR PRIMARY KEY, value VARCHAR ); Sample data in database:\nsqlite\u0026gt; .head on sqlite\u0026gt; select * from comments; tid|id|parent|created|modified|mode|remote_addr|text|author|email|website|likes|dislikes|voters|notification 1|1||1613999513.18983||1|5a01:21f3:c311:0000:0000:0000:0000:0000|First comment.||||0|0||0 sqlite\u0026gt; select * from threads; id|uri|title 1|/blog/fun/| sqlite\u0026gt; select * from preferences; key|value session-key|123456789012345678901234567890123456789056781234 Related pages: Demystifying Hugo Shortcodes: Your Ultimate Guide Hugo: How to escape shortcode in markdown Tips on Hugo SEO Custom hugo RSS template Hugo troubleshooting: execute of template failed: can\u0026#39;t give argument to non-function Add git commit date as last update date in hugo page References isso home isso server config ","excerpt":"Isso Introduction Isso is a Disqus alternative commenting server for static web sites. It is a …","ref":"https://djangocas.dev/blog/hugo/isso-static-blog-comments-setup-and-internal/","title":"Add comments to Static blog like Hugo, Jekyll with Isso"},{"body":"Slow Wi-Fi Symptom After use Mac OS X for a long time or OS upgrade, the signal indicate the wifi connection is in good state, however the Wifi connection speed became very slow, with speed test result less than 1MB/s in very good router signal coverage.\nFix Slow Wi-Fi Solution The easiest way to solve this issue is reset system wifi configuration.\nFirst turn off wifi by selecting the wi-fi menu bar item and choosing Turn Wi-Fi Off\nThen open a terminal and run following commands to move the exist wifi related configurations to a backup folder:\nmkdir -p ~/SystemConfiguration.bak cd /Library/Preferences/SystemConfiguration/ sudo mv -f com.apple.airport.preferences.plist ~/SystemConfiguration.bak/ sudo mv -f com.apple.network.eapolclient.configuration.plist ~/SystemConfiguration.bak/ sudo mv -f com.apple.wifi.message-tracer.plist ~/SystemConfiguration.bak/ sudo mv -f NetworkInterfaces.plist ~/SystemConfiguration.bak/ sudo mv -f preferences.plist ~/SystemConfiguration.bak/ Note If you do not want to backup old configurations, you can delete (replace command mv with rm) them. Then restart Mac. Go back to the Wi-Fi menu and choose Turn Wi-Fi On. Mac OS X will use default wifi configuration and wifi speed should back to normal.\nAdvanced Wireless Diagnostics Troubleshooting Wireless Diagnostics includes additional utilities for network specialists. Open them from the Window menu in the Wireless Diagnostics menu bar:\n Info gathers key details about your current network connections. Logs enables background logging for Wi-Fi and other system components. The result is saved to a .log file in the diagnostics report location on your Mac. Logging continues even when you quit the app or restart your Mac, so remember to disable logging when you\u0026rsquo;re done. Scan finds Wi-Fi routers in your environment and gathers key details about them. Performance uses live graphs to show the performance of your Wi-Fi connection: Rate shows the transmit rate over time in megabits per second. Quality shows the signal-to-noise ratio over time. When the quality is too low, your device disconnects from the Wi-Fi router. Factors that affect quality include the distance between your device and the router, and objects such as walls that impede the signal from your router. Learn more. Signal shows both signal (RSSI) and noise measurements over time. You want RSSI to be high and noise to be low, so the bigger the gap between RSSI and noise, the better.  Sniffer captures traffic on your Wi-Fi connection, which can be useful when diagnosing a reproducible issue. Select a channel and width, then click Start to begin capturing traffic on that channel. When you click Stop, a .wcap file is saved to the diagnostics report location (/var/tmp) on your Mac. Related pages: How to change Mac OS X network MAC address Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... Use Linux SO_BINDTODEVICE and mac IP_BOUND_IF to bind socket to a network interface Secure Squid Proxy Server References Resolve Wi-Fi issues Recommended settings for Wi-Fi routers and access points ","excerpt":"Slow Wi-Fi Symptom After use Mac OS X for a long time or OS upgrade, the signal indicate the wifi …","ref":"https://djangocas.dev/blog/mac/fix-mac-slow-wifi-by-reset-wifi-configuration-and-advanced-wireless-troubleshooting/","title":"Fix Slow Wi-Fi on Mac OS X by Reset Wi-Fi configuration and Advanced Wireless Troubleshooting"},{"body":"Environment Linux OS: Debian 10 Buster 64 bit (Fresh install with default options).\n$ uname -a Linux debian10 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux $ protonvpn-cli -v ProtonVPN CLI v3.8.0 (protonvpn-nm-lib v3.3.2; proton-client v0.5.1) Symptom After login success, try to connect and got an unknown error:\n$ protonvpn-cli login \u0026lt;username\u0026gt; Login successfully $ protonvpn-cli connect Setting up ProtonVPN. An unknown error has occurred. Please ensure that you have internet connectivity. If the issue persists, please contact support. Troubleshooting First use following command to view logs:\n$ protonvpn-cli --get-logs You can also view log files manually. logs store at ~/.cache/protonvpn/logs/:\n$ ls ~/.cache/protonvpn/logs/ network_manager.service.log protonvpn-cli.log protonvpn-daemon.log protonvpn-dbus-wrapper.log protonvpn.log protonvpn_reconnect.service.log protonvpn-cli.log show following error:\ncli_wrapper.py — ERROR — connect:243 — Unable to add IPv6 leak protection connection/interface Traceback (most recent call last): File \u0026quot;/usr/lib/python3/dist-packages/protonvpn_cli/cli_wrapper.py\u0026quot;, line 160, in connect protocol=protocol File \u0026quot;/usr/lib/python3/dist-packages/protonvpn_nm_lib/api.py\u0026quot;, line 145, in setup_connection self._env.connection_backend.setup(**data) File \u0026quot;/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client.py\u0026quot;, line 81, in setup self._pre_setup_connection(kwargs.get(\u0026quot;entry_ip\u0026quot;)) File \u0026quot;/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/connection_backend/nm_client/nm_client.py\u0026quot;, line 223, in _pre_setup_connection ipv6_lp.manage(KillSwitchActionEnum.ENABLE) File \u0026quot;/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/killswitch/ipv6_leak_protection.py\u0026quot;, line 62, in manage self.add_leak_protection() File \u0026quot;/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/killswitch/ipv6_leak_protection.py\u0026quot;, line 103, in add_leak_protection subprocess_command File \u0026quot;/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/killswitch/ipv6_leak_protection.py\u0026quot;, line 178, in run_subprocess raise exception(exception_msg) protonvpn_nm_lib.exceptions.EnableIPv6LeakProtectionError: Unable to add IPv6 leak protection connection/interface Continue check protonvpn.log show following error:\nipv6_leak_protection.py — INFO — add_leak_protection:75 — Adding IPv6 leak protection ipv6_leak_protection.py — INFO — manage:54 — Manage IPV6: KillSwitchActionEnum.DISABLE ipv6_leak_protection.py — INFO — get_status_connectivity_check:260 — Conn check available (0) - Conn check enabled (0) ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {\u0026lt;KillSwitchInterfaceTrackerEnum.EXISTS: 0\u0026gt;: False, \u0026lt;KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1\u0026gt;: False}} ipv6_leak_protection.py — INFO — remove_leak_protection:108 — Removing IPv6 leak protection ipv6_leak_protection.py — INFO — update_connection_status:219 — IPv6 status: {'pvpn-ipv6leak-protection': {\u0026lt;KillSwitchInterfaceTrackerEnum.EXISTS: 0\u0026gt;: False, \u0026lt;KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1\u0026gt;: False}} ipv6_leak_protection.py — ERROR — run_subprocess:169 — Interface state tracker: {'pvpn-ipv6leak-protection': {\u0026lt;KillSwitchInterfaceTrackerEnum.EXISTS: 0\u0026gt;: False, \u0026lt;KillSwitchInterfaceTrackerEnum.IS_RUNNING: 1\u0026gt;: False}} ipv6_leak_protection.py — ERROR — run_subprocess:175 — \u0026lt;class 'protonvpn_nm_lib.exceptions.EnableIPv6LeakProtectionError'\u0026gt;: CompletedProcess(args=['/usr/bin/nmcli', 'c', 'a', 'type', 'dummy', 'ifname', 'ipv6leakintrf0', 'con-name', 'pvpn-ipv6leak-protection', 'ipv6.method', 'manual', 'ipv6.addresses', 'fdeb:446c:912d:09da::/64', 'ipv6.gateway', 'fdeb:446c:912d:09da::1', 'ipv6.route-metric', '95', 'ipv6.dns-priority', '-1400', 'ipv6.ignore-auto-dns', 'yes', 'ipv6.dns', '::1'], returncode=4, stdout=b'', stderr=b\u0026quot;Error: Failed to add 'pvpn-ipv6leak-protection' connection: Insufficient privileges.\\n\u0026quot;). Raising exception. This tells us protonvpn-cli try to run nmcli but failed with Insufficient privileges.\nThe root cause is system not allowing the protonvpn-cli to manipulate NetworkManager via dbus.\nTo fix this issue, we need add a PolicyKit rule for the NetworkManager.\nUse root to create a file name /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla, the content as below:\n[nm-applet] Identity=unix-user:\u0026lt;your username\u0026gt; Action=org.freedesktop.NetworkManager.* ResultAny=yes ResultInactive=no ResultActive=yes Replace \u0026lt;your username\u0026gt; with your Linux username.\nFor multiple username:\nIdentity=unix-user:\u0026lt;username1\u0026gt;;unix-user:\u0026lt;username2\u0026gt; Check PolicyKit Authentication Agent exist or not:\n# ls /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 ls: cannot access \u0026#39;/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1\u0026#39;: No such file or directory If file does not exist, install it by apt-get install policykit-1-gnome:\n# apt-get install policykit-1-gnome Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: policykit-1-gnome 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 68.2 kB of archives. After this operation, 508 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian buster/main amd64 policykit-1-gnome amd64 0.105-7 [68.2 kB] Fetched 68.2 kB in 0s (752 kB/s) Selecting previously unselected package policykit-1-gnome. (Reading database ... 133186 files and directories currently installed.) Preparing to unpack .../policykit-1-gnome_0.105-7_amd64.deb ... Unpacking policykit-1-gnome (0.105-7) ... Setting up policykit-1-gnome (0.105-7) ... If policykit-1-gnome does not exist, try to use apt-cache search PolicyKit Authentication Agent to get correct package name:\n# apt-cache search PolicyKit Authentication Agent lxqt-policykit - LXQt authentication agent for PolicyKit lxpolkit - LXDE PolicyKit authentication agent mate-polkit - MATE authentication agent for PolicyKit-1 mate-polkit-bin - MATE authentication agent for PolicyKit-1 (executable wrapper script) mate-polkit-common - MATE authentication agent for PolicyKit-1 (common files) libpolkit-agent-1-0 - PolicyKit Authentication Agent API libpolkit-agent-1-dev - PolicyKit Authentication Agent API - development files policykit-1-gnome - authentication agent for PolicyKit polkit-kde-agent-1 - KDE dialogs for PolicyKit ukui-polkit - UKUI authentication agent for PolicyKit-1 Then try to run protonvpn-cli connect again. You should be good to go, e.g.:\n$ protonvpn-cli connect -r -p tcp Setting up ProtonVPN. Connecting to ProtonVPN on NL-FREE#1 with TCP. Successfully connected to ProtonVPN. $ nmcli connection show --active NAME UUID TYPE DEVICE proton0 FC57AEA0-7F54-436B-AC7F-83442C021247 tun proton0 ProtonVPN NL-FREE#1 B2D3B327-760B-41BA-94C3-9CB54E993E29 vpn eth0 pvpn-ipv6leak-protection 9A8986CA-E98C-44FD-B06B-09E70ABD39B2 dummy ipv6leakintrf0 Wired connection 1 1EBD7A5F-6D3E-47FE-AC12-B2846751D003 ethernet eth0 Update: Alternative simpler solution Angel (big thanks) tells me from The Debian administrator\u0026rsquo;s handbook Configuring the Network section :\n To avoid having to manually connect or disconnect the corresponding network interfaces, administrators installed the network-manager package on these roaming machines. This software enables a user to easily switch from one network to another using a small icon displayed in the notification area of their graphical desktop. Clicking on this icon displays a list of available networks (both wired and wireless), so they can simply choose the network they wish to use. The program saves the configuration for the networks to which the user has already connected, and automatically switches to the best available network when the current connection drops.\nIn order to do this, the program is structured in two parts: a daemon running as root handles activation and configuration of network interfaces and a user interface controls this daemon. PolicyKit handles the required authorizations to control this program and Debian configured PolicyKit in such a way so that members of the netdev group can add or change Network Manager connections.\n Base on this info:\n PolicyKit handles the required authorizations to control this program and Debian configured PolicyKit in such a way so that members of the netdev group can add or change Network Manager connections. That is, in Debian/Ubuntu the following could also work:\n$ sudo usermod -G netdev -a `whoami` References NetworkManager Insufficient privileges ProtonVPN linux-cli The Debian administrator\u0026rsquo;s handbook Configuring the Network section ","excerpt":"Environment Linux OS: Debian 10 Buster 64 bit (Fresh install with default options).\n$ uname -a Linux …","ref":"https://djangocas.dev/blog/linux/troubleshooting-protonvpn-EnableIPv6LeakProtectionError-Unable-to-add-IPv6-leak-protection-connection-interface/","title":"Troubleshooting ProtonVPN Linux cli EnableIPv6LeakProtectionError: Unable to add IPv6 leak protection connection/interface"},{"body":"Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. However the default hugo template does not take too much consideration on SEO. Here are some tips to use Hugo generate web site with SEO.\nEnable sitemap A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to crawl your site more efficiently. A sitemap tells Google which pages and files you think are important in your site, and also provides valuable information about these files. For example, when the page was last updated and any alternate language versions of the page.\nIn config.toml, enable sitemap:\n[sitemap] changefreq = \u0026#34;weekly\u0026#34; filename = \u0026#34;sitemap.xml\u0026#34; priority = 0.5 Make content mobile friendly Responsive design Use responsive design to adapt different size of screen.\nResponsive web design basics Add meta tags for SEO Metadata is used by browsers (how to display content or reload page), search engines (keywords), and other web services.\nThe \u0026lt;meta\u0026gt; tag defines metadata about an HTML document.\n\u0026lt;meta\u0026gt; tags always go inside the \u0026lt;head\u0026gt; element, and are typically used to specify character set charset, page description, keywords, author of the document, and viewport.settings.\nkeywords Use keywords meta tag to provide a list of search keywords of current the page.\nAdd keywords meta tag headers template:\n\u0026lt;meta name=\u0026#34;keywords\u0026#34; content=\u0026#34;{{ if .Params.Keywords }}{{ delimit .Params.Keywords \u0026#34;, \u0026#34; }}{{ end }}\u0026#34;\u0026gt; Then in markdown use keywords to define a list of keywords:\n--- title: Tips on Hugo SEO keywords: - hugo - seo .... description Use description tag to provide a short description of the page.\nAdd description meta tag to allow search engine used in the snippet shown in search results in some situations.\n\u0026lt;meta name=\u0026#34;description\u0026#34; content=\u0026#34;{{ if .Params.Description }}{{ trim .Params.Description \u0026#34;\\n\u0026#34; }}{{else if .Site.Params.Description}}{{ trim .Site.Params.Description \u0026#34;\\n\u0026#34;}}{{ end }}\u0026#34;\u0026gt; charset charset defines the page\u0026rsquo;s content type and character set. Unicode/UTF-8 is recommended where possible.\n\u0026lt;meta charset=\u0026#34;utf-8\u0026#34;\u0026gt; Note Make sure that you surround the value of the content attribute with quotes - otherwise the charset attribute may be interpreted incorrectly. viewport The viewport is the user\u0026rsquo;s visible area of a web page. It varies with the device - it will be smaller on a mobile phone than on a computer screen.\nviewport tag tells the browser how to render a page on a mobile device. Presence of this tag indicates to Google that the page is mobile friendly.\nAdd viewport\u0026rsquo;s initial-scale=1 to avoid text scale too small on small screen.\n\u0026lt;meta name=\u0026#34;viewport\u0026#34; content=\u0026#34;width=device-width, initial-scale=1, shrink-to-fit=no\u0026#34;\u0026gt; more about how to configure the viewport meta tag robots Use robots tags to control the behavior of search engine crawling and indexing.\n{{ if eq (getenv \u0026#34;HUGO_ENV\u0026#34;) \u0026#34;production\u0026#34; }} \u0026lt;meta name=\u0026#34;robots\u0026#34; content=\u0026#34;index,follow\u0026#34;\u0026gt; {{ else }} \u0026lt;meta name=\u0026#34;robots\u0026#34; content=\u0026#34;noindex,nofollow\u0026#34;\u0026gt; {{ end }} noindex prevent most search engine web crawlers from indexing a page on your site. noindex tells search engine do not show this page, media, or resource in search results. If you don\u0026rsquo;t specify this directive, the page, media, or resource may be indexed and shown in search results.\nnofollow tells search engine do not follow the links on this page. If you don\u0026rsquo;t specify this directive, Google may use the links on the page to discover those linked pages.\nAdd target and rel to external Link By default, the markdown link generated link open in current window, to allow open external link in new window/tab and have rel=\u0026quot;nofollow noopener\u0026quot;, override markup render-link.\nCreate layouts/_default/_markup/render-link.html with following content:\n\u0026lt;a href=\u0026#34;{{ .Destination | safeURL }}\u0026#34; {{ with .Title}} title=\u0026#34;{{ . }}\u0026#34;{{ else }} title=\u0026#34;{{ .Text | safeHTML }}\u0026#34; {{ end }} {{ if strings.HasPrefix .Destination \u0026#34;http\u0026#34; }} target=\u0026#34;_blank\u0026#34; rel=\u0026#34;nofollow noopener\u0026#34;{{ end }}\u0026gt; {{ .Text | safeHTML }}\u0026lt;/a\u0026gt; Now\n[Hello example](https://www.example.com) will render as\n\u0026lt;a href=\u0026#34;https://www.example.com\u0026#34; title=\u0026#34;Hello example\u0026#34; target=\u0026#34;_blank\u0026#34; rel=\u0026#34;nofollow noopener\u0026#34;\u0026gt;Hello example\u0026lt;/a\u0026gt; WebPageTest: Test and optimize specific web page performance WebPage Test is a online tool which measures web performance metrics in real browsers.\nKey take away:\n Effective use CDN Enable Keep-alive Compress transfer Compress images Cache static content Enhance security by add security headers: Strict-Transport-Security: The HTTP Strict-Transport-Security response header (often abbreviated as HSTS) lets a web site tell browsers that it should only be accessed using HTTPS, instead of using HTTP.\nExample:\nStrict-Transport-Security: max-age=31536000; includeSubDomains.\n X-Content-Type-Options: The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised in the Content-Type headers should be followed and not be changed. The header allows you to avoid MIME type sniffing by saying that the MIME types are deliberately configured.\nExample:\nX-Content-Type-Options: nosniff.\n X-Frame-Options: The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a \u0026lt;frame\u0026gt;, \u0026lt;iframe\u0026gt;, \u0026lt;embed\u0026gt; or \u0026lt;object\u0026gt;. Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.\nExample:\nX-Frame-Options: SAMEORIGIN.\n Content-Security-Policy: The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints. This helps guard against cross-site scripting attacks.\n Lighthouse: Test and improve your site SEO score Lighthouse is an open-source, automated tool for improving the quality of web pages. You can run it against any web page, public or requiring authentication. It has audits for performance, accessibility, progressive web apps, SEO and more.\nRun lighthouse in Chrome DevTools to identify and fix common problems that affect your sites\u0026rsquo;s performance, accessibility and user experience, those also improve your site SEO score.\nSEO Checklist LOCAL CITATIONS A citation is a complete or partial reference to your business name address, and phone number. Most citations will also allow you to include your website. LINK BUILDING There is no such thing as a local seo campaign without link building. POSITIVE REVIEWS Reviews are a major ranking factor for local seo. Getting positive review and managing negative reviews is also part of the ranking factors. RESPONSIVE WEB DESIGN ON PAGE SEO On page SEO can provide that extra bump that you need to get you to the top or the rankings and increase your traffic. Setting a canonical URL. Establish URL best practice. Target keyword in title and H1. Fill out meta descriptions. Related pages: Demystifying Hugo Shortcodes: Your Ultimate Guide Hugo: How to escape shortcode in markdown Add comments to Static blog like Hugo, Jekyll with Isso Custom hugo RSS template Hugo troubleshooting: execute of template failed: can\u0026#39;t give argument to non-function Add git commit date as last update date in hugo page References Responsive web design basics Meta tags that Google understands Hugo: Configure Markup SEO tool: lighthouse WebPageTest Content Security Policy (CSP) ","excerpt":"Hugo is one of the most popular open-source static site generators. With its amazing speed and …","ref":"https://djangocas.dev/blog/hugo/tips-on-hugo-seo/","title":"Tips on Hugo SEO (Search Engine Optimize) Best Practices"},{"body":"Hugo ships with its own RSS 2.0 template, it generated the RSS feed file as index.xml and embedded into index.html header. e.g.\n{{ range .AlternativeOutputFormats -}} {{ printf `\u0026lt;link rel=\u0026#34;%s\u0026#34; type=\u0026#34;%s\u0026#34; href=\u0026#34;%s\u0026#34; \u0026gt;` .Rel .MediaType.Type .Permalink | safeHTML }} {{ end -}} Generated html:\n\u0026lt;link rel=\u0026#34;alternate\u0026#34; type=\u0026#34;application/rss+xml\u0026#34; href=\u0026#34;https://djangocas.dev/blog/index.xml\u0026#34;\u0026gt; Default RSS template: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml Add \u0026lt;lastBuildDate\u0026gt; to \u0026lt;item\u0026gt; show the page last modification time By default, the individual \u0026lt;item\u0026gt; only have \u0026lt;pubDate\u0026gt;. I want to add \u0026lt;lastBuildDate\u0026gt; as page\u0026rsquo;s last git commit. To do this. Change the RSS template file and use $.Page.Lastmod as \u0026lt;lastBuildDate\u0026gt;. e.g.\n\u0026lt;lastBuildDate\u0026gt;{{ $.Page.Lastmod.Format \u0026#34;Mon, 02 Jan 2006 15:04:05 -0700\u0026#34; | safeHTML }}\u0026lt;/lastBuildDate\u0026gt; Change \u0026lt;description\u0026gt; By default, \u0026lt;description\u0026gt; is very simple, just use .Summary:\n\u0026lt;description\u0026gt;{{ .Summary | html }}\u0026lt;/description\u0026gt; To make more attractive, e.g. adding image in page, change .Summary to use .Description. Here is an example:\n\u0026lt;description\u0026gt; {{ $img := (.Resources.ByType \u0026#34;image\u0026#34;).GetMatch \u0026#34;*featured*\u0026#34; }} {{ with $img }} {{ $img := .Resize \u0026#34;640x\u0026#34; }} {{ printf \u0026#34;\u0026lt;![CDATA[\u0026lt;img src=\\\u0026#34;%s\\\u0026#34; width=\\\u0026#34;%d\\\u0026#34; height=\\\u0026#34;%d\\\u0026#34;/\u0026gt;]]\u0026gt;\u0026#34; $img.Permalink $img.Width $img.Height | safeHTML }} {{ end }} {{ .Description | html }} \u0026lt;/description\u0026gt; The full \u0026lt;item\u0026gt; for a reference:\n\u0026lt;item\u0026gt; \u0026lt;title\u0026gt;{{ .Section | title }}: {{ .Title }}\u0026lt;/title\u0026gt; \u0026lt;link\u0026gt;{{ .Permalink }}\u0026lt;/link\u0026gt; \u0026lt;lastBuildDate\u0026gt;{{ $.Page.Lastmod.Format \u0026#34;Mon, 02 Jan 2006 15:04:05 -0700\u0026#34; | safeHTML }}\u0026lt;/lastBuildDate\u0026gt; \u0026lt;pubDate\u0026gt;{{ .Date.Format \u0026#34;Mon, 02 Jan 2006 15:04:05 -0700\u0026#34; | safeHTML }}\u0026lt;/pubDate\u0026gt; {{ with .Site.Author.email }}\u0026lt;author\u0026gt;{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}\u0026lt;/author\u0026gt;{{end}} \u0026lt;guid\u0026gt;{{ .Permalink }}\u0026lt;/guid\u0026gt; \u0026lt;description\u0026gt; {{ $img := (.Resources.ByType \u0026#34;image\u0026#34;).GetMatch \u0026#34;*featured*\u0026#34; }} {{ with $img }} {{ $img := .Resize \u0026#34;640x\u0026#34; }} {{ printf \u0026#34;\u0026lt;![CDATA[\u0026lt;img src=\\\u0026#34;%s\\\u0026#34; width=\\\u0026#34;%d\\\u0026#34; height=\\\u0026#34;%d\\\u0026#34;/\u0026gt;]]\u0026gt;\u0026#34; $img.Permalink $img.Width $img.Height | safeHTML }} {{ end }} {{ .Description | html }} \u0026lt;/description\u0026gt; \u0026lt;/item\u0026gt; Enjoy.\nRelated pages: Demystifying Hugo Shortcodes: Your Ultimate Guide Hugo: How to escape shortcode in markdown Add comments to Static blog like Hugo, Jekyll with Isso Tips on Hugo SEO Hugo troubleshooting: execute of template failed: can\u0026#39;t give argument to non-function Add git commit date as last update date in hugo page References Hugo: Git Info Variables Hugo: RSS Templates ","excerpt":"Hugo ships with its own RSS 2.0 template, it generated the RSS feed file as index.xml and embedded …","ref":"https://djangocas.dev/blog/hugo/custom-hugo-rss/","title":"Custom hugo RSS template"},{"body":"Symptom After upgrade hugo from 0.62.2 to 0.79.1 and run hugo build got following error:\n$ HUGO_ENV=\u0026#34;production\u0026#34; hugo Start building sites … ERROR 2021/05/05 15:01:35 render of \u0026#34;page\u0026#34; failed: execute of template failed: template: blog/single.html:2:3: executing \u0026#34;main\u0026#34; at \u0026lt;.Render\u0026gt;: error calling Render: \u0026#34;foo.md:7:15\u0026#34;: failed to execute template [\u0026#34;content\u0026#34;] v: \u0026#34;.../blog/content.html:7:15\u0026#34;: execute of template failed: template: blog/content.html:7:15: executing \u0026#34;blog/content.html\u0026#34; at \u0026lt;(.Params.showLastmod) (ne $.Date $.Page.Lastmod)\u0026gt;: can\u0026#39;t give argument to non-function .Params.showLastmod Content of blog/content.html:7:\n{{ if and ((.Params.showLastmod) (ne $.Date $.Page.Lastmod)) }} Looks like newer version of hugo can not handle this condition.\nSolution Split the single condition check to multiple check:\n{{ if .Params.showLastmod }} {{ if ne $.Date $.Page.Lastmod }} ... {{ end }} {{ end }} Related pages: Demystifying Hugo Shortcodes: Your Ultimate Guide Hugo: How to escape shortcode in markdown Add comments to Static blog like Hugo, Jekyll with Isso Tips on Hugo SEO Custom hugo RSS template Add git commit date as last update date in hugo page ","excerpt":"Symptom After upgrade hugo from 0.62.2 to 0.79.1 and run hugo build got following error:\n$ …","ref":"https://djangocas.dev/blog/hugo/troubleshooting-hugo-error-execute-of-template-failed-cant-give-argument-to-non-function/","title":"Hugo troubleshooting: execute of template failed: can't give argument to non-function"},{"body":"Symptom Use OkHttpClient.Builder() to add User-Agent header.\nval okHttpClient = OkHttpClient.Builder() .addNetworkInterceptor { chain -\u0026gt; val requestBuilder = chain.request().newBuilder() .addHeader(\u0026#34;User-Agent\u0026#34;, userAgent) With this code, server does not get new User-Agent, it still use OkHttp default user agent, for example:\n\u0026quot;User-Agent\u0026quot;: \u0026quot;okhttp/3.14.9\u0026quot; Troubleshooting The OkHttp already have a default User-Agent, addHeader() does not override the default value.\nSolution Remove User-Agent header before call addHeader(\u0026quot;User-Agent\u0026quot;, ...):\nval okHttpClient = OkHttpClient.Builder() .addNetworkInterceptor { chain -\u0026gt; val requestBuilder = chain.request().newBuilder() .removeHeader(\u0026#34;User-Agent\u0026#34;) // otherwise addHeader not work. .addHeader(\u0026#34;User-Agent\u0026#34;, userAgent) Reference okhttp bug #5399: Okhttp overrides user-agent header ","excerpt":"Symptom Use OkHttpClient.Builder() to add User-Agent header.\nval okHttpClient = …","ref":"https://djangocas.dev/blog/android/android-okhttp-change-user-agent-header/","title":"Android OkHttp change User-Agent header"},{"body":"Pain point: By default, Android WebView cannot load PDF files. :(\nLuckily, there are various ways to how to load PDF file in Android webview.\nOpen Intent with startActivity If your requirement does not need use embedded webview to show PDF, you can just use startActivity() to let system choose proper app to open PDF:\nval intent = Intent(Intent.ACTION_VIEW) intent.data = Uri.parse(url) startActivity(intent) Use google docs service to load pdf in html page The trick is load PDF file in an html page, then use webview to load html.\nSay you have an PDF with URL https://www.example.com/foo.pdf, you can load in html like this: https://drive.google.com/viewerng/viewer?embedded=true\u0026amp;url=https://www.example.com/foo.pdf\nString pdfViewerURL = \u0026#34;https://drive.google.com/viewerng/viewer?embedded=true\u0026amp;url=\u0026#34;; WebView webview = (WebView) findViewById(R.id.webview); webview.getSettings().setJavaScriptEnabled(true); webview.getSettings().setSupportZoom(true); String pdfURL = \u0026#34;https://www.your-domain.com/path/to/your/fun.pdf\u0026#34;; String url = pdfViewerURL + pdfURL webview.loadUrl(url); This does not require any third party library, but it depends on Google service. There are reports say Google pdf viewer may return error:\nNote After testing it persistently for 2 days, I got an error on Google docs saying\nYou\u0026rsquo;ve reached the bandwidth limit for viewing or downloading files that aren\u0026rsquo;t in Google Docs format\u0026hellip;..\nSo doesn\u0026rsquo;t seem reliable.\n Use pdfjs pdf.js is a general-purpose, web standards-based platform for parsing and rendering PDFs.\nUse pdf.js need extra work, there is open source project PdfWebview have a great sample.\nCreate resource files under src/main/assets/pdfviewer.html \u0026lt;html lang=\u0026#34;en\u0026#34;\u0026gt; \u0026lt;head\u0026gt; \u0026lt;meta charset=\u0026#34;UTF-8\u0026#34;\u0026gt; \u0026lt;meta name=\u0026#34;viewport\u0026#34; content=\u0026#34;width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=4.0,user-scalable=yes\u0026#34;/\u0026gt; \u0026lt;title\u0026gt;Document\u0026lt;/title\u0026gt; \u0026lt;style type=\u0026#34;text/css\u0026#34;\u0026gt; canvas { width: 100%; height: 100%; border: 1px solid black; } \u0026lt;/style\u0026gt; \u0026lt;script type=\u0026#34;text/javascript\u0026#34; src=\u0026#34;pdf.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;script type=\u0026#34;text/javascript\u0026#34; src=\u0026#34;pdf.worker.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;script type=\u0026#34;text/javascript\u0026#34; src=\u0026#34;pdf.sandbox.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;script type=\u0026#34;text/javascript\u0026#34; src=\u0026#34;pdfviewer.js\u0026#34;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; Create resource files under src/main/assets/pdfviewer.js var url = location.search.substring(1); function createPage() { var div = document.createElement(\u0026#34;canvas\u0026#34;); document.body.appendChild(div); return div; } function renderPage(num) { pdfDoc.getPage(num).then(function (page) { var viewport = page.getViewport({ scale: 2.0 }); var canvas = createPage(); var ctx = canvas.getContext(\u0026#39;2d\u0026#39;); canvas.height = viewport.height; canvas.width = viewport.width; page.render({ canvasContext: ctx, viewport: viewport }).promise.then(() =\u0026gt; {}); }); } pdfjsLib.getDocument(url).promise.then(function (pdf) { pdfDoc = pdf; for (var i = 1; i \u0026lt;= pdfDoc.numPages; i++) { renderPage(i) } }); Download pdf.js to assets Then download pdf.js, pdf.worker.js and pdf.sandbox.js from pdf.js to src/main/assets/.\nSample code to load pdf with pdf.js Here is an example code to load pdf in webview use pdf.js:\nwebView = findViewById(R.id.webview) val settings: WebSettings? = webView?.settings settings?.javaScriptEnabled = true settings?.allowFileAccess = true settings?.builtInZoomControls = true settings?.setSupportZoom(true) settings?.displayZoomControls = false webView?.loadUrl(\u0026#34;file:///android_asset/pdfviewer.html?https://www.your-domain.com/path/to/your/fun.pdf\u0026#34;); That\u0026rsquo;s it.\nReferences How can I display a pdf document into a Webview? PdfWebview pdf.js: PDF Reader in JavaScript ","excerpt":"Pain point: By default, Android WebView cannot load PDF files. :(\nLuckily, there are various ways to …","ref":"https://djangocas.dev/blog/android/various-ways-to-load-pdf-in-android-webview/","title":"Various ways to load PDF in Android webview"},{"body":"Symptom Have a Android project run junit test fine, suddenly it failed to run unit test with following error:\nxxxxTest initializationError java.lang.NoClassDefFoundError: android/content/Context at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2615) at java.lang.Class.getDeclaredMethods(Class.java:1860) at org.junit.internal.MethodSorter.getDeclaredMethods(MethodSorter.java:54) ... ... ... Caused by: java.lang.ClassNotFoundException: android.content.Context at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:419) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:352) Troubleshooting This error is weird since the error is not 100% reproduce-able.\nTried run test with gradle and there is no error. Just use following command to run junit test in gradle command line:\n./gradlew test Check the java version, I have two java sdk installed. One is system java sdk, the other is Android sdk.\n$ java -version java version \u0026#34;10.0.1\u0026#34; 2018-04-17 $ /Applications/Android\\ Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version openjdk version \u0026#34;1.8.0_242-release\u0026#34; The gradle use system java, Android studio use the other jdk. This caused the issue.\nSolution Use the same jdk.\nIn mac, get JAVA_HOME path by /urs/libexec/java_home:\n$ /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home Then set this path in Android Studio for current project by following steps:\n Click File menu. Click Project Structure. Click SDK Location in left side navigation. Set JDK Location to output of /urs/libexec/java_home. Remove .gradle folder in project folder. Then rebuild project in Android studio and re-run test, should be good now.\nSimilar errors for references All those errors may cause by the same issue. List here for a cross reference.\njava.lang.NoClassDefFoundError: android/app/Application java.lang.NoClassDefFoundError: android/app/Application at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) java.lang.NoClassDefFoundError: android/os/Parcelable java.lang.NoClassDefFoundError: android/os/Parcelable at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2615) at java.lang.Class.getDeclaredMethods(Class.java:1860) at org.junit.internal.MethodSorter.getDeclaredMethods(MethodSorter.java:54) at org.junit.internal.runners.JUnit38ClassRunner.\u0026lt;init\u0026gt;(JUnit38ClassRunner.java:74) at org.junit.internal.builders.JUnit3Builder.runnerForClass(JUnit3Builder.java:11) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:36) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:41) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: java.lang.ClassNotFoundException: android.os.Parcelable at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 33 more java.lang.NoClassDefFoundError: android/util/Log java.lang.NoClassDefFoundError: android/util/Log at com.randomtype.yycparking.StallTests.setUp(StallTests.java:11) at junit.framework.TestCase.runBare(TestCase.java:132) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.ClassNotFoundException: android.util.Log at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 14 more ","excerpt":"Symptom Have a Android project run junit test fine, suddenly it failed to run unit test with …","ref":"https://djangocas.dev/blog/android/android-test-failure-noclassdeffounderror-android-content-context/","title":"Weird Android junit test failure java.lang.NoClassDefFoundError: android/content/Context"},{"body":"What is CODEPAGE A code page is a character encoding standard used to represent text in computers. It defines a specific set of characters and their corresponding byte values. Each code page allows for the representation of a unique subset of characters from a given character set, enabling the proper display and manipulation of text data in different languages and scripts.\nKey points about code pages:\n Character Representation: Each code page maps specific byte values to characters. For example, a code page may include characters for the English alphabet, numbers, punctuation, and symbols.\n Localization: Different code pages are used to accommodate different languages and regional character sets. For instance, code pages for Western European languages differ from those used for Asian languages.\n Examples: Common code pages include:\n ASCII (Code Page 437): Represents basic English characters. ISO 8859-1: Extends ASCII to include characters for many Western European languages. UTF-8: A variable-length encoding that can represent all Unicode characters and is widely used on the web. Database Context: In database management systems, specifying a code page is important for ensuring that text data is stored and retrieved correctly, particularly when dealing with multiple languages or special characters.\n Understanding code pages is essential for text processing, data interchange, and ensuring compatibility across different systems and applications.\nCommon codepages Here are some of the most common code pages:\n ASCII (Code Page 437)\n Description: Represents basic English characters and control codes. Range: 0-127. ISO 8859 Series\n ISO 8859-1 (Latin-1): Western European languages (e.g., English, French, German). ISO 8859-2 (Latin-2): Central and Eastern European languages (e.g., Polish, Czech). ISO 8859-5: Cyrillic script (e.g., Russian). ISO 8859-6: Arabic script. ISO 8859-7: Greek script. ISO 8859-9 (Latin-5): Turkish language. Windows Code Pages\n Windows-1250: Central and Eastern European languages. Windows-1251: Cyrillic script (e.g., Russian). Windows-1252: Western European languages (similar to ISO 8859-1). Windows-1254: Turkish language. Windows-1255: Hebrew script. UTF Encodings\n UTF-8: Variable-length encoding for all Unicode characters, widely used on the web. UTF-16: Fixed-length encoding for most common characters, used in many Windows applications. EBCDIC\n Description: Used mainly in IBM mainframes. Common variants include: EBCDIC US-Canada EBCDIC International GBK(Code page 936) Code Page 936 is a character encoding used primarily for simplified Chinese characters. It is also known as GBK (Guo Biao Kuozhan) and is an extension of the GB2312 character set. Here are some key points about Code Page 936:\n Character Set: Supports simplified Chinese characters, including a wide range of characters used in modern Chinese texts. Includes additional characters beyond those found in GB2312, making it suitable for a broader range of applications. Encoding: It is a double-byte encoding system, meaning that most characters are represented by two bytes, allowing for a larger character set. This encoding can represent more than 21,000 characters. Usage: Commonly used in Windows environments for applications and documents that require simplified Chinese. Widely used in software, databases, and web pages targeting Chinese-speaking users. Compatibility: GBK is backward compatible with GB2312, meaning any character in GB2312 can be represented in GBK. It is often used in conjunction with other encodings, such as UTF-8, to support mixed-language content. Code Page 936 (GBK) is an important encoding standard for simplified Chinese, providing extensive character coverage and compatibility with earlier standards. It plays a crucial role in text processing, software development, and data storage in contexts involving Chinese language content. These code pages are essential for text representation in various languages and are widely used in different systems. UTF-8 has become the most popular encoding for web content due to its ability to handle a wide variety of characters.\nAll Codepage list 37 (=x0025) EBCDIC US English 273 (=x0111) EBCDIC German 277 (=x0115) EBCDIC Danish/Norwegian 278 (=x0116) EBCDIC Finnish/Swedish 280 (=x0118) EBCDIC Italian 284 (=x011C) EBCDIC Spanish 285 (=x011D) EBCDIC UK English 297 (=x0129) EBCDIC French 300 (=x012C) EBCDIC Japanese DBCS 301 (=x012D) Japanese PC DBCS 420 (=x01A4) EBCDIC Arabic 424 (=x01A8) EBCDIC Arabic 437 (=x01B5) PC-ASCII US 500 (=x01F4) EBCDIC International 803 (=x0323) Hebrew Set A 813 (=x032D) ISO8859-7 Greek 819 (=x0333) ISO8859-1 Western European 833 (=x0341) IBM-833: Korean 834 (=x0342) IBM-834: Korean Host DBCS 835 (=x0343) EBCDIC Traditional Chinese DBCS 836 (=x0344) EBCDIC Simplified Chinese SBCS 838 (=x0346) EBCDIC Thai SBCS 850 (=x0352) ISO8859-1 Western European 852 (=x0354) PC-ASCII Eastern European 855 (=x0357) PC-ASCII Cyrillic 856 (=x0358) PC-ASCII Hebrew 857 (=x0359) PC-ASCII Turkish 858 (=x035A) PC-ASCII Western European with Euro 860 (=x035C) PC-ASCII Portuguese 861 (=x035D) PC-ASCII Icelandic 862 (=x035E) PC-ASCII Hebrew 863 (=x035F) PC-ASCII Canadian French 864 (=x0360) PC-ASCII Arabic 865 (=x0361) PC-ASCII Scandinavian 866 (=x0362) PC-ASCII Cyrillic #2 868 (=x0364) PC-ASCII Urdu 869 (=x0365) PC-ASCII Greek 870 (=x0366) EBCDIC Eastern Europe 871 (=x0367) EBCDIC Icelandic 872 (=x0368) PC-ASCII Cyrillic with Euro 874 (=x036A) PC-ASCII Thai SBCS 875 (=x036B) EBCDIC Greek 880 (=x0370) EBCDIC Cyrillic 891 (=x037B) IBM-891: Korean 897 (=x0381) PC-ASCII Japan Data SBCS 903 (=x0387) PC Simplified Chinese SBCS 904 (=x0388) PC Traditional Chinese Data - SBCS 912 (=x0390) ISO8859-2 Eastern European 915 (=x0393) ISO8859-5 Cyrillic 916 (=x0394) ISO8859-8 Hebrew 918 (=x0396) EBCDIC Urdu 920 (=x0398) ISO8859-9 Turkish 921 (=x0399) ISO Baltic 922 (=x039A) ISO Estonian 923 (=x039B) ISO8859-15 Western Europe with euro (Latin 9) 924 (=x039C) EBCDIC Western Europe with euro 927 (=x039F) PC Traditional Chinese DBCS 928 (=x03A0) PC Simplified Chinese DBCS 930 (=x03A2) EBCDIC Japanese Katakana/Kanji mixed 932 (=x03A4) Japanese OS/2 933 (=x03A5) EBCDIC Korean Mixed 935 (=x03A7) EBCDIC Simplified Chinese Mixed 936 (=0x3A8) GBK (Guo Biao Kuozhan) and is an extension of the GB2312 character set 937 (=x03A9) EBCDIC Traditional Chinese Mixed 939 (=x03AB) EBCDIC Japanese Latin/Kanji mixed 941 (=x03AD) Japanese PC DBCS - for open systems 942 (=x03AE) Japanese PC Data Mixed - extended SBCS 943 (=x03AF) Japanese PC Mixed - for open systems 944 (=x03BO) Korean PC data Mixed - extended SBCS 946 (=x03B2) Simplified Chinese PC data Mixed - extended SBCS 947 (=x03B3) PC Traditional Chinese DBCS 948 (=x03B4) PC Traditional Chinese Mixed - extended SBCS 949 (=x03B5) PC Korean Mixed - KS code 950 (=x03B6) PC Traditional Chinese Mixed - big5 951 (=x03B7) PC Korean DBCS - KS code 970 (=x03CA) euc Korean 1004 (=x03EC) PC Data Latin1 1006 (=x03EE) ISO Urdu 1008 (=x03F0) ASCII Arabic 8-bit ISO 1025 (=x0401) EBCDIC Cyrillic 1026 (=x0402) EBCDIC Turkish 1027 (=x0403) EBCDIC Japanese Latin 1040 (=x0410) IBM-1040: Korean 1041 (=x0411) Japanese PC - extended SBCS 1042 (=x0412) PC Simplified Chinese - extended SBCS 1043 (=x0413) PC Traditional Chinese - extended SBCS 1046 (=x0416) PC-ASCII Arabic 1047 (=x0417) IBM-1047: Western European 1051 (=x041B) ASCII roman8 for HP Western European 1088 (=x0440) PC Korean SBCS - KS code 1089 (=x0441) ISO8859-6 Arabic 1097 (=x0449) EBCDIC Farsi 1098 (=x044A) PC-ASCII Farsi 1112 (=x0458) EBCDIC Baltic (Latvian/Lithuanian) 1114 (=x045A) PC Traditional Chinese - big 5 SBCS 1115 (=x045B) PC Simplified Chinese SBCS 1122 (=x0462) EBCDIC Estonian 1123 (=x0463) EBCDIC Ukrainian 1124 (=x0464) UNIX-ASCII Ukrainian 1131 (=x046B) PC-ASCII Belarus 1140 (=x0474) EBCDIC USA, with euro (like 037) 1141 (=x0475) EBCDIC Austria, Germany, with euro (like 273) 1142 (=x0476) EBCDIC Denmark, Norway, with euro (like 277) 1143 (=x0477) EBCDIC Finland, Sweden, with euro (like 278) 1144 (=x0478) EBCDIC Italy, with euro (like 280) 1145 (=x0479) EBCDIC Spain, with euro (like 284) 1146 (=x047A) EBCDIC UK, with euro (like 285) 1147 (=x047B) EBCDIC France, with euro (like 297) 1148 (=x047C) EBCDIC International, with euro (like 500) 1149 (=x047D) EBCDIC Iceland, with euro (like 871) 1200 (=x04B0) Unicode - UCS-2 1208 (=x04B8) Unicode - UTF-8 1250 (=x04E2) Windows - Eastern European 1251 (=x04E3) Windows - Cyrillic 1252 (=x04E4) Windows - Western European 1253 (=x04E5) Windows - Greek 1254 (=x04E6) Windows - Turkish 1255 (=x04E7) Windows - Hebrew 1256 (=x04E8) Windows - Arabic 1257 (=x04E9) Windows - Baltic Rim 1275 (=x04FB) Apple - Western European 1280 (=x0500) Apple - Greek 1281 (=x0501) Apple - Turkish 1282 (=x0502) Apple - Eastern European 1283 (=x0503) Apple - Cyrillic 1284 (=x0504) IBM-504: Eastern European 1285 (=x0505) IBM-505: Eastern European 1363 (=x0553) Windows Korean PC Mixed including 11,172 full hangul 1364 (=x0554) Korean Host Mixed extended including 11,172 full hangul 1380 (=x0564) PC Simplified Chinese DBCS 1381 (=x0565) PC Simplified Chinese Mixed 1383 (=x0567) euc Simplified Chinese Mixed 1386 (=x056A) PC Simplified Chinese Data GBK Mixed 1388 (=x056C) DBCS Host Simplified Chinese Data GBK Mixed 5346 (=x14E2) Windows-Eastern European with Euro (like 1250) 5347 (=x14E3) Windows - Cyrillic with Euro (like 1251) 5348 (=x14E4) Windows-Western European with Euro (like 1252) 5349 (=x14E5) Windows-Windows - Greek with Euro (like 1253) 5350 (=x14E6) Windows - Turkish with Euro (like 1254) 5351 (=x14E7) Windows - Hebrew with Euro (like 1255) 5352 (=x14E8) Windows - Arabic with Euro (like 1256) 5353 (=x14E9) Windows - Baltic Rim with Euro (like 1257) 5354 (=x14EA) 'Windows - Vietnamese with Euro (like 1258) ","excerpt":"What is CODEPAGE A code page is a character encoding standard used to represent text in computers. …","ref":"https://djangocas.dev/blog/codepages/","title":"Understanding Code Pages and Full List of Code Pages"},{"body":"A quick reference the procedures for performing offline and online full backups, incremental backups, and database recovery in DB2.\nOffline Full Backup First, ensure that no users are using DB2: db2 list applications for db sample Stop the database and restart it to disconnect all connections: db2stop force db2start Execute the backup command (using TSM as the backup medium): db2 backup db sample use tsm A successful backup will return a timestamp.\nCheck the backup success: db2 list history backup all for sample You should see the record for this backup. The db2adutl query command can also show the return value.\nNote: First execute the backup command on the primary node (the node where the catalog tablespace is located), then perform this operation on other nodes. Online Backup First, enable the database configuration parameters that support online backup: db2 update db cfg for sample using userexit on -- Enable user exit db2 update db cfg for sample using logretain on -- Enable archive logging db2 update db cfg for sample using trackmod on -- Enable incremental backup feature (These settings need to be applied on each node separately.)\nAfter enabling these parameters, the database will be in a backup pending state, requiring an offline full backup. Perform an offline full backup using the commands mentioned above.\nThe online backup command is as follows: db2 backup db sample online use tsm A successful backup will return a timestamp.\n You can also use db2adutl and db2 list history to check the backup records.\n Note: Perform this operation on each node as well.\n Online Incremental Backup With the necessary three parameters enabled, perform the incremental backup: db2 backup db sample online incremental use tsm A successful backup will return a timestamp.\n You can also use db2adutl and db2 list history to check the backup records.\n There is also a type of delta backup:\n db2 backup db sample online incremental delta use tsm The difference between these two types of backups is similar to Oracle Exports' Incremental and Cumulative methods; DB2\u0026rsquo;s incremental corresponds to Oracle\u0026rsquo;s cumulative method, while DB2\u0026rsquo;s delta corresponds to Oracle\u0026rsquo;s incremental method.\nNote: Perform this operation on each node as well. Database Recovery Manually drop the database to simulate a disaster recovery situation, and execute the following operation: db2 drop db sample Restore the backup history records (every backup, regardless of type, will back up the history record file). The timestamp here should be the most recent: db2 restore db sample history file use tsm taken at 20030102223107 buffer 100 Use DB2’s recovery assistance tool: db2ckrst -d sample -t 20030101224424 -r database The command will return suggested necessary recovery operation commands.\nAccording to the prompts from the assistance tool, first perform version recovery with the following command: db2 restore db sample incremental use tsm taken at 20030101224424 buffer 100 Similarly, perform the recovery on the primary node first, then on other nodes.\nAt this point, the database is in a rollforward-pending state, requiring a rollforward operation: db2 rollforward db sample to 2003-01-12-13.27.25.000000 on all nodes and stop Roll forward to the same timestamp. This operation should be performed on the primary node.\nAdditional Notes: Recovery operations can also be online or offline, similar to backup operations.\n Recovery at the tablespace level is similar to backup and restore; simply add the clause TABLESPACE (tablespace-name). Tablespace-level backup/recovery operations require the database to be in archive log mode and with incremental backup enabled.\n In the recovery example, only version recovery was performed. If there are newer full backups and incremental backups available, you can perform recovery in sequence (note the recommended recovery order and frequency using db2ckrst) before proceeding with roll forward.\n ","excerpt":"A quick reference the procedures for performing offline and online full backups, incremental …","ref":"https://djangocas.dev/blog/db2/db2-offline-online-full-incremental-backup-restore/","title":"DB2: Offline and Online Full Backup, Incremental Backup, and Recovery Operations"},{"body":"Introduction Elliptic Curve Digital Signature Algorithm (ECDSA) offers a variant of the Digital Signature Algorithm (DSA) which uses elliptic curve cryptography.\nECDSA keys and signatures are shorter than in RSA for the same security level. A 256-bit ECDSA signature has the same security strength like 3072-bit RSA signature.\nThe ECDSA signing algorithm RFC 6979 takes as input a message msg + a private key privKey and produces as output a signature, which consists of pair of integers {r, s}.\nECDSA signatures are 2 times longer than the signer\u0026rsquo;s private key for the curve used during the signing process. For example, for 256-bit elliptic curves (like secp256k1) the ECDSA signature is 512 bits (64 bytes) and for 521-bit curves (like secp521r1) the signature is 1042 bits.\nGenerate signature in Kotlin In Android app, ECDSA is supported by default.\nGenerate a ECDSA key pair and sign\nclass EcdsaSha256 { companion object { private const val KEYPIRE_ALIAS = \u0026#34;MY_ECDSA_KEY_PAIR\u0026#34; } /** * sign `message` with `SHA256withECDSA`. * * @return base64 encoded ASN.1 signature, or \u0026#34;\u0026#34; if can not get key pair. */ fun sign(message: String): String { val entry = getKeyPair() ?: return \u0026#34;\u0026#34; val signature = Signature.getInstance(\u0026#34;SHA256withECDSA\u0026#34;) signature.initSign(entry.privateKey) signature.update(message.toByteArray()) return Base64.encodeToString(signature.sign(), Base64.NO_WRAP) } private fun generateKeyPair(): KeyPair { val keyPairGenerator = KeyPairGenerator.getInstance(KeyProperties.KEY_ALGORITHM_EC, \u0026#34;AndroidKeyStore\u0026#34;) keyPairGenerator.initialize(KeyGenParameterSpec.Builder(KEYPIRE_ALIAS, KeyProperties.PURPOSE_SIGN or KeyProperties.PURPOSE_VERIFY) .setDigests(KeyProperties.DIGEST_SHA256, KeyProperties.DIGEST_SHA512) .setKeySize(256) .build()) return keyPairGenerator.generateKeyPair() } private fun getKeyPair(): KeyStore.PrivateKeyEntry? { val keyStore = KeyStore.getInstance(\u0026#34;AndroidKeyStore\u0026#34;) keyStore.load(null) var res = keyStore.getEntry(KEYPIRE_ALIAS, null) if (res == null) { generateKeyPair() keyStore.load(null) res = keyStore.getEntry(KEYPIRE_ALIAS, null) } return res as? KeyStore.PrivateKeyEntry } } Sample SHA256 with ECDSA sign:\necdsaSha256 = EcdsaSha256() val message = \u0026#34;To be, or not to be, that is the question.\u0026#34; signature = ecdsaSha256.sign(message) Log.d(TAG, \u0026#34;publicKey: $publicKey\u0026#34;) Log.d(TAG, \u0026#34;message: $message\u0026#34;) Log.d(TAG, \u0026#34;signature: $signature\u0026#34;) Log output:\npublicKey: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbUTlq/bTW47fORzMskrc8+wNV3ekCX1WNKJ03XOjHzOFecniFAdDaRxluAl/osB5LH6dj8Rl4InJC/vEtFZ7dA== message: To be, or not to be, that is the question. signature: MEUCIQC0YJirr4yM0JEmprRJfYA/7lVUohR4qEMbiJtwzhm9RwIgS3YkgWyNuMCh6o0FQXliW6xhjEYZT/cTmqsdpNH+YB0= The signature format is ASN.1 structure message defined in RFC 5480: Elliptic Curve Cryptography Subject Public Key Information :\nECDSA-Sig-Value ::= SEQUENCE { r INTEGER, s INTEGER } We will see how to parse it in Go in next section.\nVerify Signature in Golang Golang have ecdsa package implements the Elliptic Curve Digital Signature Algorithm.\nTo verify ECDSA signature in Golang, first need load public key from string:\nfunc loadECPublicKey2(base64PublicKey string) (*ecdsa.PublicKey, error) { publicKeyBytes, err := base64.StdEncoding.DecodeString(base64PublicKey) if err != nil { panic(err) } pub, err := x509.ParsePKIXPublicKey(publicKeyBytes) if err != nil { return nil, errors.New(\u0026#34;Failed to parse ECDSA public key\u0026#34;) } publicKey, ok := pub.(*ecdsa.PublicKey) if !ok { return nil, errors.New(\u0026#34;Not a ECDSA public key\u0026#34;) } return publicKey, nil } Note ECDSA sign is based on hash, so it need first calculate message hash. There are two APIs in ecdsa :\n ecdsa.Verify() verifies the signature in r, s of hash using the public key, pub. ecdsa.VerifyASN1() verifies the ASN.1 encoded signature, sig, of hash using the public key, pub. ecdsa.Verify() ecdsa.Verify() need decode signature to get r and s first:\ntype ECDSASignature struct { R, S *big.Int } // ecdsaVerify1 use `ecdsa.Verify()` to verify signature func ecdsaVerify1(base64PublicKey string, message string, base64Signature string) bool { ecPublicKey, err := loadECPublicKey2(base64PublicKey) if err != nil { panic(err) } hash := sha256.Sum256([]byte(message)) sigBytes, err := base64.StdEncoding.DecodeString(base64Signature) if err != nil { panic(err) } sig := \u0026amp;ECDSASignature{} if _, err = asn1.Unmarshal(sigBytes, sig); err != nil { panic(err) } return ecdsa.Verify(ecPublicKey, hash[:], sig.R, sig.S) } Usage example:\nmatch := ecdsaVerify1( \u0026#34;MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbUTlq/bTW47fORzMskrc8+wNV3ekCX1WNKJ03XOjHzOFecniFAdDaRxluAl/osB5LH6dj8Rl4InJC/vEtFZ7dA==\u0026#34;, \u0026#34;To be, or not to be, that is the question.\u0026#34;, \u0026#34;MEUCIQC0YJirr4yM0JEmprRJfYA/7lVUohR4qEMbiJtwzhm9RwIgS3YkgWyNuMCh6o0FQXliW6xhjEYZT/cTmqsdpNH+YB0=\u0026#34;, ) fmt.Printf(\u0026#34;ecdsaVerify1() return %v\\n\u0026#34;, match) ecdsa.VerifyASN1() ecdsa.VerifyASN1() is a simple way to verify ASN.1 encoded signature, you donot need manually decode signature to get r and s:\n// ecdsaVerify2 use `ecdsa.VerifyASN1()` to verify signature func ecdsaVerify2(base64PublicKey string, message string, base64Signature string) bool { ecPublicKey, err := loadECPublicKey2(base64PublicKey) if err != nil { panic(err) } hash := sha256.Sum256([]byte(message)) sigBytes, err := base64.StdEncoding.DecodeString(base64Signature) if err != nil { panic(err) } return ecdsa.VerifyASN1(ecPublicKey, hash[:], sigBytes) } Usage example:\nmatch := ecdsaVerify2( \u0026#34;MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbUTlq/bTW47fORzMskrc8+wNV3ekCX1WNKJ03XOjHzOFecniFAdDaRxluAl/osB5LH6dj8Rl4InJC/vEtFZ7dA==\u0026#34;, \u0026#34;To be, or not to be, that is the question.\u0026#34;, \u0026#34;MEUCIQC0YJirr4yM0JEmprRJfYA/7lVUohR4qEMbiJtwzhm9RwIgS3YkgWyNuMCh6o0FQXliW6xhjEYZT/cTmqsdpNH+YB0=\u0026#34;, ) fmt.Printf(\u0026#34;ecdsaVerify2() return %v\\n\u0026#34;, match) Related pages: Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security OpenSSL CSR Examples: Self Signed Certificate and How to Start Test TLS/SSL Server/Client testssl.sh examples command line tool check server TLS/SSL (weak) ciphers and detect TLS/SSL vulnerabilities Test TLS Connection Ciphers TLS Version and Certificate with OpenSSL Command Line Running a DoH Client to encrypt all home DNS traffic Secure Squid Proxy Server References Elliptic Curve Digital Signature Algorithm FIPS PUB 186-4: Digital Signature Standard (DSS) ECDSA: Elliptic Curve Signatures RFC 5480: Elliptic Curve Cryptography Subject Public Key Information RFC 6979: Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA) ","excerpt":"Introduction Elliptic Curve Digital Signature Algorithm (ECDSA) offers a variant of the Digital …","ref":"https://djangocas.dev/blog/ecdsa-signature-verify-in-kotlin-and-go/","title":"ECDSA signature verify in kotlin and Golang"},{"body":"Introduction openssl s_client is an SSL/TLS client program that can be used to test TLS server connectivity, TLS/SSL version support, check cipher suites, and verify server certificate. It is a very useful diagnostic tool for SSL servers.\nUsage: s_client [options] Valid options are: -help Display this summary -host val Use -connect instead -port +int Use -connect instead -connect val TCP/IP where to connect (default is :4433) -bind val bind local address for connection -proxy val Connect to via specified proxy to the real server -unix val Connect over the specified Unix-domain socket -4 Use IPv4 only -6 Use IPv6 only -verify +int Turn on peer certificate verification -cert infile Certificate file to use, PEM format assumed -certform PEM|DER Certificate format (PEM or DER) PEM default -nameopt val Various certificate name options -key val Private key file to use, if not in -cert file -keyform PEM|DER|ENGINE Key format (PEM, DER or engine) PEM default -pass val Private key file pass phrase source -CApath dir PEM format directory of CA\u0026#39;s -CAfile infile PEM format file of CA\u0026#39;s -no-CAfile Do not load the default certificates file -no-CApath Do not load certificates from the default certificates directory -requestCAfile infile PEM format file of CA names to send to the server -dane_tlsa_domain val DANE TLSA base domain -dane_tlsa_rrdata val DANE TLSA rrdata presentation form -dane_ee_no_namechecks Disable name checks when matching DANE-EE(3) TLSA records -reconnect Drop and re-make the connection with the same Session-ID -showcerts Show all certificates sent by the server -debug Extra output -msg Show protocol messages -msgfile outfile File to send output of -msg or -trace, instead of stdout -nbio_test More ssl protocol testing -state Print the ssl states -crlf Convert LF from terminal into CRLF -quiet No s_client output -ign_eof Ignore input eof (default when -quiet) -no_ign_eof Don\u0026#39;t ignore input eof -starttls val Use the appropriate STARTTLS command before starting TLS -xmpphost val Alias of -name option for \u0026#34;-starttls xmpp[-server]\u0026#34; -rand val Load the file(s) into the random number generator -writerand outfile Write random data to the specified file -sess_out outfile File to write SSL session to -sess_in infile File to read SSL session from -use_srtp val Offer SRTP key management with a colon-separated profile list -keymatexport val Export keying material using label -keymatexportlen +int Export len bytes of keying material (default 20) -maxfraglen +int Enable Maximum Fragment Length Negotiation (len values: 512, 1024, 2048 and 4096) -fallback_scsv Send the fallback SCSV -name val Hostname to use for \u0026#34;-starttls lmtp\u0026#34;, \u0026#34;-starttls smtp\u0026#34; or \u0026#34;-starttls xmpp[-server]\u0026#34; -CRL infile CRL file to use -crl_download Download CRL from distribution points -CRLform PEM|DER CRL format (PEM or DER) PEM is default -verify_return_error Close connection on verification error -verify_quiet Restrict verify output to errors -brief Restrict output to brief summary of connection parameters -prexit Print session information when the program exits -security_debug Enable security debug messages -security_debug_verbose Output more security debug output -cert_chain infile Certificate chain file (in PEM format) -chainCApath dir Use dir as certificate store path to build CA certificate chain -verifyCApath dir Use dir as certificate store path to verify CA certificate -build_chain Build certificate chain -chainCAfile infile CA file for certificate chain (PEM format) -verifyCAfile infile CA file for certificate verification (PEM format) -nocommands Do not use interactive command letters -servername val Set TLS extension servername (SNI) in ClientHello (default) -noservername Do not send the server name (SNI) extension in the ClientHello -tlsextdebug Hex dump of all TLS extensions received -status Request certificate status from server -serverinfo val types Send empty ClientHello extensions (comma-separated numbers) -alpn val Enable ALPN extension, considering named protocols supported (comma-separated list) -async Support asynchronous operation -ssl_config val Use specified configuration file -max_send_frag +int Maximum Size of send frames -split_send_frag +int Size used to split data for encrypt pipelines -max_pipelines +int Maximum number of encrypt/decrypt pipelines to be used -read_buf +int Default read buffer size to be used for connections -no_ssl3 Just disable SSLv3 -no_tls1 Just disable TLSv1 -no_tls1_1 Just disable TLSv1.1 -no_tls1_2 Just disable TLSv1.2 -no_tls1_3 Just disable TLSv1.3 -bugs Turn on SSL bug compatibility -no_comp Disable SSL/TLS compression (default) -comp Use SSL/TLS-level compression -no_ticket Disable use of TLS session tickets -serverpref Use server\u0026#39;s cipher preferences -legacy_renegotiation Enable use of legacy renegotiation (dangerous) -no_renegotiation Disable all renegotiation. -legacy_server_connect Allow initial connection to servers that don\u0026#39;t support RI -no_resumption_on_reneg Disallow session resumption on renegotiation -no_legacy_server_connect Disallow initial connection to servers that don\u0026#39;t support RI -allow_no_dhe_kex In TLSv1.3 allow non-(ec)dhe based key exchange on resumption -prioritize_chacha Prioritize ChaCha ciphers when preferred by clients -strict Enforce strict certificate checks as per TLS standard -sigalgs val Signature algorithms to support (colon-separated list) -client_sigalgs val Signature algorithms to support for client certificate authentication (colon-separated list) -groups val Groups to advertise (colon-separated list) -curves val Groups to advertise (colon-separated list) -named_curve val Elliptic curve used for ECDHE (server-side only) -cipher val Specify TLSv1.2 and below cipher list to be used -ciphersuites val Specify TLSv1.3 ciphersuites to be used -min_protocol val Specify the minimum protocol version to be used -max_protocol val Specify the maximum protocol version to be used -record_padding val Block size to pad TLS 1.3 records to. -debug_broken_protocol Perform all sorts of protocol violations for testing purposes -no_middlebox Disable TLSv1.3 middlebox compat mode -policy val adds policy to the acceptable policy set -purpose val certificate chain purpose -verify_name val verification policy name -verify_depth int chain depth limit -auth_level int chain authentication security level -attime intmax verification epoch time -verify_hostname val expected peer hostname -verify_email val expected peer email -verify_ip val expected peer IP address -ignore_critical permit unhandled critical extensions -issuer_checks (deprecated) -crl_check check leaf certificate revocation -crl_check_all check full chain revocation -policy_check perform rfc5280 policy checks -explicit_policy set policy variable require-explicit-policy -inhibit_any set policy variable inhibit-any-policy -inhibit_map set policy variable inhibit-policy-mapping -x509_strict disable certificate compatibility work-arounds -extended_crl enable extended CRL features -use_deltas use delta CRLs -policy_print print policy processing diagnostics -check_ss_sig check root CA self-signatures -trusted_first search trust store first (default) -suiteB_128_only Suite B 128-bit-only mode -suiteB_128 Suite B 128-bit mode allowing 192-bit algorithms -suiteB_192 Suite B 192-bit-only mode -partial_chain accept chains anchored by intermediate trust-store CAs -no_alt_chains (deprecated) -no_check_time ignore certificate validity time -allow_proxy_certs allow the use of proxy certificates -xkey infile key for Extended certificates -xcert infile cert for Extended certificates -xchain infile chain for Extended certificates -xchain_build build certificate chain for the extended certificates -xcertform PEM|DER format of Extended certificate (PEM or DER) PEM default -xkeyform PEM|DER format of Extended certificate\u0026#39;s key (PEM or DER) PEM default -tls1 Just use TLSv1 -tls1_1 Just use TLSv1.1 -tls1_2 Just use TLSv1.2 -tls1_3 Just use TLSv1.3 -dtls Use any version of DTLS -timeout Enable send/receive timeout on DTLS connections -mtu +int Set the link layer MTU -dtls1 Just use DTLSv1 -dtls1_2 Just use DTLSv1.2 -nbio Use non-blocking IO -psk_identity val PSK identity -psk val PSK in hex (without 0x) -psk_session infile File to read PSK SSL session from -srpuser val SRP authentication for \u0026#39;user\u0026#39; -srppass val Password for \u0026#39;user\u0026#39; -srp_lateuser SRP username into second ClientHello message -srp_moregroups Tolerate other than the known g N values. -srp_strength +int Minimal length in bits for N -nextprotoneg val Enable NPN extension, considering named protocols supported (comma-separated list) -engine val Use engine, possibly a hardware device -ssl_client_engine val Specify engine to be used for client certificate operations -ct Request and parse SCTs (also enables OCSP stapling) -noct Do not request or parse SCTs (default) -ctlogfile infile CT log list CONF file -keylogfile outfile Write TLS secrets to file -early_data infile File to send as early data -enable_pha Enable post-handshake-authentication openssl s_client usage examples Use -connect \u0026lt;host\u0026gt;:\u0026lt;port\u0026gt; to connect to a TLS server Use -connect \u0026lt;host\u0026gt;:\u0026lt;port\u0026gt; to connect to a TLS server and see TLS handshake process, server certificate:\n$ openssl s_client -connect www.google.com:443 CONNECTED(00000005) depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign verify return:1 depth=1 C = US, O = Google Trust Services, CN = GTS CA 1O1 verify return:1 depth=0 C = US, ST = California, L = Mountain View, O = Google LLC, CN = www.google.com verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google LLC/CN=www.google.com i:/C=US/O=Google Trust Services/CN=GTS CA 1O1 1 s:/C=US/O=Google Trust Services/CN=GTS CA 1O1 i:/OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign --- Server certificate -----BEGIN CERTIFICATE----- MIIFkzCCBHugAwIBAgIQUvtF6bzAHyEDAAAAAMMjOTANBgkqhkiG9w0BAQsFADBC MQswCQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZpY2VzMRMw EQYDVQQDEwpHVFMgQ0EgMU8xMB4XDTIwMTIxNTE0MzYxNVoXDTIxMDMwOTE0MzYx NFowaDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcT DU1vdW50YWluIFZpZXcxEzARBgNVBAoTCkdvb2dsZSBMTEMxFzAVBgNVBAMTDnd3 dy5nb29nbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqPmk rg4JZBqxukAqXcsIyoQ7EfkoYZooKy9OGOk0FsbA662QAhRvLyScRnAaKLeT/s1p lOzLIguQKCl8GkrNJRWjhhG9G95IWGOCuOxjdvRWF5RADpIPbapGAH0awFsO9hlg VzxsuZC+hHOrAVvUAI5x7tYhz6SYMjsbj0BUz2WzEnSXonY85Zy825rFBjpfJf69 CGJpCx1+T4w7USP7GqsdpI8kNSHfFSbt7Z8U5mdn4LG7tvaMS/oVlcE2P5O09lDT Yz1+MlxIeQnzSFt0R9S2Xrbv6oNuEdzoqKFXEHcQ+SDcf4Kb5ghpPezjiufwtotR /gwqXHrMLTZ3lzsMzQIDAQABo4ICXTCCAlkwDgYDVR0PAQH/BAQDAgWgMBMGA1Ud JQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFGfXwgDfHBsH oA7W51LPuYfBeHI0MB8GA1UdIwQYMBaAFJjR+G4Q68+b7GCfGJAboOt9Cf0rMGgG CCsGAQUFBwEBBFwwWjArBggrBgEFBQcwAYYfaHR0cDovL29jc3AucGtpLmdvb2cv Z3RzMW8xY29yZTArBggrBgEFBQcwAoYfaHR0cDovL3BraS5nb29nL2dzcjIvR1RT MU8xLmNydDAZBgNVHREEEjAQgg53d3cuZ29vZ2xlLmNvbTAhBgNVHSAEGjAYMAgG BmeBDAECAjAMBgorBgEEAdZ5AgUDMDMGA1UdHwQsMCowKKAmoCSGImh0dHA6Ly9j cmwucGtpLmdvb2cvR1RTMU8xY29yZS5jcmwwggEFBgorBgEEAdZ5AgQCBIH2BIHz APEAdgD2XJQv0XcwIhRUGAgwlFaO400TGTO/3wwvIAvMTvFk4wAAAXZnC4CJAAAE AwBHMEUCIERZyIP0GBfWUDPpmMCMVYBgpSKpIQuqnsFo2MoRHDWsAiEA/+nQTy9E sKLKfzDABLRUz/P+TZGGjM7UVQjtWe/+s+sAdwBc3EOS/uarRUSxXprUVuYQN/vV +kfcoXOUsl7m9scOygAAAXZnC4C7AAAEAwBIMEYCIQCPyfB8H0em1gHv8QQeF4zN Hkfv47lQjNsszABWeYXfwwIhAKngHPHb1UKDE3LMF6FYEdsGOK63kdIfUuyWLX0A UYszMA0GCSqGSIb3DQEBCwUAA4IBAQAbkVw9feVP0maVCLVO/TKFBQWgcQTHtJGI k2YTSZCSwLYe7Xboae5t6inwKu0yB+bYqUC2itFpv7BCsZv4rPOH6zBHHH2CSlZB 1XI40WrnPwGMr3P1aR2dsUw1gDEXFwgXdFbL/u/9WUjeUogQULSFxqJXrYB693az 96FCwtoSg3+WC5IcEJElDEE0kgS8o5ZyJ4GLmLBYsWcMkbx80/pDf71ylBts63e0 u5k2sQuBcNhIGaRIFmP9SHYXyTtSlaB84RwThgkhr40S3QZWDNiqht2WnM65UHUR CVEiml3bIKMz+fLaOgroFKQy8uBw7tei+gzbbqqyJbicdgcSDgd3 -----END CERTIFICATE----- subject=/C=US/ST=California/L=Mountain View/O=Google LLC/CN=www.google.com issuer=/C=US/O=Google Trust Services/CN=GTS CA 1O1 --- No client certificate CA names sent Server Temp Key: ECDH, X25519, 253 bits --- SSL handshake has read 3208 bytes and written 281 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-RSA-CHACHA20-POLY1305 Server public key is 2048 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-RSA-CHACHA20-POLY1305 Session-ID: EDF30CC8709D2A7E5930E21DF4FC95B10C0438A6BBB64D550C975936B1B2E7B7 Session-ID-ctx: Master-Key: 6C731ACB4248F67690838BE615E945E8D7CDD418794C54F5E33BF7487939EDC0C13DBED09DEC2A95F093F63713250762 TLS session ticket lifetime hint: 100800 (seconds) TLS session ticket: 0000 - 01 56 db 77 af 6f 79 83-c8 d1 36 2b 85 d6 e4 15 .V.w.oy...6+.... 0010 - 25 4e 56 25 b7 1b 2b 3a-18 a8 5b 4a 9d 7b 82 5b %NV%..+:..[J.{.[ 0020 - 28 73 44 7e a5 74 12 7d-63 56 39 02 7e 74 9c 11 (sD~.t.}cV9.~t.. 0030 - cf c9 d3 a2 b0 c7 42 26-1b 05 ba 70 0b f0 16 78 ......B\u0026amp;...p...x 0040 - d0 83 8c bd 49 3c b3 f5-e7 49 e8 21 ab 3c 46 9d ....I\u0026lt;...I.!.\u0026lt;F. 0050 - 0d 26 2e 3a 86 0b d5 ba-64 c0 59 65 0c 26 cc b6 .\u0026amp;.:....d.Ye.\u0026amp;.. 0060 - 18 3d f4 55 ad fd 82 d0-c1 b0 3e c9 45 65 71 cf .=.U......\u0026gt;.Eeq. 0070 - 76 c1 86 fa 85 d0 17 40-48 9f 33 03 64 ad 76 83 v......@H.3.d.v. 0080 - d5 0a cf 74 2f 71 3d 6b-4d be 55 08 9f a8 87 9b ...t/q=kM.U..... 0090 - 03 18 0e 9e 99 bc d5 d6-b8 1c 95 d4 55 27 b3 00 ............U\u0026#39;.. 00a0 - a8 2d 83 c2 1d ee 49 3e-06 a9 98 67 14 68 7e ac .-....I\u0026gt;...g.h~. 00b0 - dd 95 85 55 4e 56 b8 88-e2 71 98 8d c4 93 e9 65 ...UNV...q.....e 00c0 - 31 0e b7 9a 87 bd 90 9d-dc 8e e5 d2 6a 34 16 53 1...........j4.S 00d0 - dd 71 d3 70 62 d7 b6 43-81 96 3f b9 7b .q.pb..C..?.{ Start Time: 1610932834 Timeout : 7200 (sec) Verify return code: 0 (ok) --- GET / HTTP/1.1 HTTP/1.1 200 OK Date: Mon, 18 Jan 2021 01:20:39 GMT After connected, you can send HTTP request like GET:\nGET / HTTP/1.1 Host: google.com Note After GET request line and headers, you need an extra empty lines to indicate end of request, then server will send response back. Use -showcerts to show all certificates in the chain By default, only the server\u0026rsquo;s certificate is printed in output. To print all the certificate chain, need use -showcerts:\n$ openssl s_client -connect dns.google:853 -showcerts CONNECTED(00000006) depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign verify return:1 depth=1 C = US, O = Google Trust Services, CN = GTS CA 1O1 verify return:1 depth=0 C = US, ST = California, L = Mountain View, O = Google LLC, CN = dns.google verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google LLC/CN=dns.google i:/C=US/O=Google Trust Services/CN=GTS CA 1O1 -----BEGIN CERTIFICATE----- MIIGIjCCBQqgAwIBAgIRAJTRUTehSoT8AwAAAADDI0EwDQYJKoZIhvcNAQELBQAw QjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFUdvb2dsZSBUcnVzdCBTZXJ2aWNlczET MBEGA1UEAxMKR1RTIENBIDFPMTAeFw0yMDEyMTUxNDM2MjZaFw0yMTAzMDkxNDM2 MjVaMGQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH Ew1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgTExDMRMwEQYDVQQDEwpk bnMuZ29vZ2xlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv/ulxhYN FowGZ+8VIk8eIWsj/tHekcfTtmtIP9KgdhyXlmXXlntHx330XiX9UfCSfbnu3UP5 Za/BM8rRm+3yVCsi0QVU+mey35hLLdBaKvdmrTQkYIdVhHDWGQN8C1f6UGq8nNPN X7HLyxxXa03vEpLvtaSzULVprYfppGlqDLvUqqVbF9loTtZp6sdtPYAM0j8O71SK DnUCdMu3WGPEhK2ImyUdk6Oq+CFueRNLbBL6Lfkd1NWLyebpbKQcMNmSbQfphZga 4WXmfhXWF5Vblyn4FBxarw96O1FDX/jUdOFbKRfR0GxvhS5Qt+dPEhom52JdTth6 dfLtmbvdnqPcAwIDAQABo4IC7zCCAuswDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQM MAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFJrgW406vF0JgE8F CJd5Cgc1/RDOMB8GA1UdIwQYMBaAFJjR+G4Q68+b7GCfGJAboOt9Cf0rMGgGCCsG AQUFBwEBBFwwWjArBggrBgEFBQcwAYYfaHR0cDovL29jc3AucGtpLmdvb2cvZ3Rz MW8xY29yZTArBggrBgEFBQcwAoYfaHR0cDovL3BraS5nb29nL2dzcjIvR1RTMU8x LmNydDCBrAYDVR0RBIGkMIGhggpkbnMuZ29vZ2xlghAqLmRucy5nb29nbGUuY29t ggs4ODg4Lmdvb2dsZYIOZG5zLmdvb2dsZS5jb22CEGRuczY0LmRucy5nb29nbGWH ECABSGBIYAAAAAAAAAAAAGSHECABSGBIYAAAAAAAAAAAZGSHECABSGBIYAAAAAAA AAAAiESHECABSGBIYAAAAAAAAAAAiIiHBAgIBASHBAgICAgwIQYDVR0gBBowGDAI BgZngQwBAgIwDAYKKwYBBAHWeQIFAzAzBgNVHR8ELDAqMCigJqAkhiJodHRwOi8v Y3JsLnBraS5nb29nL0dUUzFPMWNvcmUuY3JsMIIBAwYKKwYBBAHWeQIEAgSB9ASB 8QDvAHUA9lyUL9F3MCIUVBgIMJRWjuNNExkzv98MLyALzE7xZOMAAAF2ZwuscwAA BAMARjBEAiAWqt7W7bSnzvbUwayFoEbGWagFR2K+itqZCW5NF4WG2AIgJ38Z6+ZF eCnzIrOcZejKC/uj095tb1fIhhALpfNJEMIAdgCUILwejtWNbIhzH4KLIiwN0dpN XmxPlD1h204vWE2iwgAAAXZnC6x9AAAEAwBHMEUCIQC/+FJmLcs2ijzNDaw8spRE y5+9x53+ZzSUS55Dvun5GQIgV7cuRxpIdZ80U4d4B8zXliMiCMX2ppZ11R2Yof27 /5cwDQYJKoZIhvcNAQELBQADggEBADuBZ8NVva0NDcVcBDsy571lS/05TbHvq9u4 xzbqIwEjrX8LhJpEs9n/ZNcClzS63laDGSB8NtOLy1X4BIUoQXOBZ59Nhm43bJCO ObwlZVOJvU8tQ3RajQeJ6vvBQEFtbTxPAphjrPWcrmt5Rn4nIToHRApd8SPgBAXo e+T9S2MKFJh7M18VcSUpi8qUphwKoc3w1AMcZnrbM2WE6xdY/7H48pVijdNgyMau VwAMTKh7a2fEs6/jAZHWbAnjtQQc3ltOWZO/h7MbG38TKbvTud8+JZQdcwCM5cS5 MnwzXvYoyKQEc4sHj9scMKnXyM9Cgbqh0wGH0eaIscCNIu7ULeU= -----END CERTIFICATE----- 1 s:/C=US/O=Google Trust Services/CN=GTS CA 1O1 i:/OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign -----BEGIN CERTIFICATE----- MIIESjCCAzKgAwIBAgINAeO0mqGNiqmBJWlQuDANBgkqhkiG9w0BAQsFADBMMSAw HgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFs U2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAwNDJaFw0yMTEy MTUwMDAwNDJaMEIxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVHb29nbGUgVHJ1c3Qg U2VydmljZXMxEzARBgNVBAMTCkdUUyBDQSAxTzEwggEiMA0GCSqGSIb3DQEBAQUA A4IBDwAwggEKAoIBAQDQGM9F1IvN05zkQO9+tN1pIRvJzzyOTHW5DzEZhD2ePCnv UA0Qk28FgICfKqC9EksC4T2fWBYk/jCfC3R3VZMdS/dN4ZKCEPZRrAzDsiKUDzRr mBBJ5wudgzndIMYcLe/RGGFl5yODIKgjEv/SJH/UL+dEaltN11BmsK+eQmMF++Ac xGNhr59qM/9il71I2dN8FGfcddwuaej4bXhp0LcQBbjxMcI7JP0aM3T4I+DsaxmK FsbjzaTNC9uzpFlgOIg7rR25xoynUxv8vNmkq7zdPGHXkxWY7oG9j+JkRyBABk7X rJfoucBZEqFJJSPk7XA0LKW0Y3z5oz2D0c1tJKwHAgMBAAGjggEzMIIBLzAOBgNV HQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1Ud EwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFJjR+G4Q68+b7GCfGJAboOt9Cf0rMB8G A1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYuMDUGCCsGAQUFBwEBBCkwJzAl BggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdvb2cvZ3NyMjAyBgNVHR8EKzAp MCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29nL2dzcjIvZ3NyMi5jcmwwPwYDVR0g BDgwNjA0BgZngQwBAgIwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly9wa2kuZ29vZy9y ZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAGoA+Nnn78y6pRjd9XlQWNa7H TgiZ/r3RNGkmUmYHPQq6Scti9PEajvwRT2iWTHQr02fesqOqBY2ETUwgZQ+lltoN FvhsO9tvBCOIazpswWC9aJ9xju4tWDQH8NVU6YZZ/XteDSGU9YzJqPjY8q3MDxrz mqepBCf5o8mw/wJ4a2G6xzUr6Fb6T8McDO22PLRL6u3M4Tzs3A2M1j6bykJYi8wW IRdAvKLWZu/axBVbzYmqmwkm5zLSDW5nIAJbELCQCZwMH56t2Dvqofxs6BBcCFIZ USpxu6x6td0V7SvJCCosirSmIatj/9dSSVDQibet8q/7UK4v4ZUN80atnZz1yg== -----END CERTIFICATE----- --- Server certificate subject=/C=US/ST=California/L=Mountain View/O=Google LLC/CN=dns.google issuer=/C=US/O=Google Trust Services/CN=GTS CA 1O1 --- No client certificate CA names sent Server Temp Key: ECDH, X25519, 253 bits --- SSL handshake has read 3351 bytes and written 281 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-RSA-CHACHA20-POLY1305 Server public key is 2048 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-RSA-CHACHA20-POLY1305 Session-ID: 47BCFDC6F09F1C08656913CAB4851B105FC0366BBDA0469857CF32491EE2459E Session-ID-ctx: Master-Key: 709A838FB4591838009662B8444D0392728187586EF01A5308004512FA9A78D94FB6A390C136EB772E7AB4B6D5C02801 TLS session ticket lifetime hint: 100800 (seconds) TLS session ticket: 0000 - 01 67 b1 01 e7 5c 56 42-e2 25 d6 67 47 3f 8f af .g...\\VB.%.gG?.. 0010 - 08 79 f0 be d4 87 3a 6b-3b ab f3 a8 01 15 11 ce .y....:k;....... 0020 - f5 f6 db 3f 2d 8a f3 35-28 1c b1 6a 45 7a a8 4b ...?-..5(..jEz.K 0030 - 83 94 92 80 98 93 65 6d-45 4b 67 e0 e8 b6 42 3b ......emEKg...B; 0040 - ab 67 b2 a3 4f 39 a4 8a-79 07 a5 24 ae da e5 93 .g..O9..y..$.... 0050 - 62 d6 ec 48 ef da 9b b1-4a 21 40 ac 9a 79 ba f4 b..H....J!@..y.. 0060 - 77 62 7e 6f 0b a6 df 32-21 e0 05 55 26 3e 1a 6e wb~o...2!..U\u0026amp;\u0026gt;.n 0070 - 2a 27 0f df 93 e2 4b a2-6f d6 4f c1 a5 45 2c 9e *\u0026#39;....K.o.O..E,. 0080 - 1e 27 70 b1 02 c7 6c a5-7c 2a eb 5d 87 80 b8 c9 .\u0026#39;p...l.|*.].... 0090 - 7e d0 86 f4 2a de 5a 5b-f4 85 8e db 5b 8a 27 68 ~...*.Z[....[.\u0026#39;h 00a0 - 4a f6 48 7a d7 d7 9d 7e-44 07 a9 46 f8 ec 38 93 J.Hz...~D..F..8. 00b0 - 23 92 b4 d0 b6 d8 2c ac-46 ad 12 4b 59 31 8e 6a #.....,.F..KY1.j 00c0 - 8e 2c 4d ad 39 2f 67 33-2b 40 46 ad 27 62 ba 25 .,M.9/g3+@F.\u0026#39;b.% 00d0 - 2f 52 60 a4 74 71 98 d0-f7 6d 3d db 65 /R`.tq...m=.e Start Time: 1610933223 Timeout : 7200 (sec) Verify return code: 0 (ok) --- Use -servername to pass server name (SNI) to openssl s_client You can connect to IP and pass server name (SNI) to openssl s_client:\n -servername name Set TLS extension servername in ClientHello (SNI) Example of use -servername to pass SNI:\n$ openssl s_client -connect 93.184.216.34:443 -servername example.com CONNECTED(00000003) depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA verify return:1 depth=1 C = US, O = DigiCert Inc, CN = DigiCert TLS RSA SHA256 2020 CA1 verify return:1 depth=0 C = US, ST = California, L = Los Angeles, O = Internet\\C2\\A0Corporation\\C2\\A0for\\C2\\A0Assigned\\C2\\A0Names\\C2\\A0and\\C2\\A0Numbers, CN = www.example.org verify return:1 write W BLOCK --- Certificate chain 0 s:/C=US/ST=California/L=Los Angeles/O=Internet\\xC2\\xA0Corporation\\xC2\\xA0for\\xC2\\xA0Assigned\\xC2\\xA0Names\\xC2\\xA0and\\xC2\\xA0Numbers/CN=www.example.org i:/C=US/O=DigiCert Inc/CN=DigiCert TLS RSA SHA256 2020 CA1 1 s:/C=US/O=DigiCert Inc/CN=DigiCert TLS RSA SHA256 2020 CA1 i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA --- Server certificate -----BEGIN CERTIFICATE----- MIIHSjCCBjKgAwIBAgIQDB/LGEUYx+OGZ0EjbWtz8TANBgkqhkiG9w0BAQsFADBP MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSkwJwYDVQQDEyBE aWdpQ2VydCBUTFMgUlNBIFNIQTI1NiAyMDIwIENBMTAeFw0yMzAxMTMwMDAwMDBa Fw0yNDAyMTMyMzU5NTlaMIGWMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv cm5pYTEUMBIGA1UEBxMLTG9zIEFuZ2VsZXMxQjBABgNVBAoMOUludGVybmV0wqBD b3Jwb3JhdGlvbsKgZm9ywqBBc3NpZ25lZMKgTmFtZXPCoGFuZMKgTnVtYmVyczEY MBYGA1UEAxMPd3d3LmV4YW1wbGUub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAwoB3iVm4RW+6StkR+nutx1fQevu2+t0Fu6KBcbvhfyHSXy7w0nJO dTT4jWLjStpRkNQBPZwMwHH35i+21gdnJtDe/xfO8IX9McFmyodlBUcqX8CruIzD v9AXf2OjXPBG+4aq+03XKl5/muATl32++301Vw1dXoGYNeoWQqLTsHT3WS3tOOf+ ehuzNuZ+rj+ephaD3lMBToEArrtC9R91KTTN6YSAOK48NxTA8CfOMFK5itxfIqB5 +E9OSQTidXyqLyoeA+xxTKMqYfxvypEek1oueAhY9u67NCBdmuavxtfyvwp7+o6S d+NsewxAhmRKFexw13KOYzDhC+9aMJcuJQIDAQABo4ID2DCCA9QwHwYDVR0jBBgw FoAUt2ui6qiqhIx56rTaD5iyxZV2ufQwHQYDVR0OBBYEFLCTP+gXgv1ssrYXh8vj gP6CmwGeMIGBBgNVHREEejB4gg93d3cuZXhhbXBsZS5vcmeCC2V4YW1wbGUubmV0 ggtleGFtcGxlLmVkdYILZXhhbXBsZS5jb22CC2V4YW1wbGUub3Jngg93d3cuZXhh bXBsZS5jb22CD3d3dy5leGFtcGxlLmVkdYIPd3d3LmV4YW1wbGUubmV0MA4GA1Ud DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwgY8GA1Ud HwSBhzCBhDBAoD6gPIY6aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0 VExTUlNBU0hBMjU2MjAyMENBMS00LmNybDBAoD6gPIY6aHR0cDovL2NybDQuZGln aWNlcnQuY29tL0RpZ2lDZXJ0VExTUlNBU0hBMjU2MjAyMENBMS00LmNybDA+BgNV HSAENzA1MDMGBmeBDAECAjApMCcGCCsGAQUFBwIBFhtodHRwOi8vd3d3LmRpZ2lj ZXJ0LmNvbS9DUFMwfwYIKwYBBQUHAQEEczBxMCQGCCsGAQUFBzABhhhodHRwOi8v b2NzcC5kaWdpY2VydC5jb20wSQYIKwYBBQUHMAKGPWh0dHA6Ly9jYWNlcnRzLmRp Z2ljZXJ0LmNvbS9EaWdpQ2VydFRMU1JTQVNIQTI1NjIwMjBDQTEtMS5jcnQwCQYD VR0TBAIwADCCAX8GCisGAQQB1nkCBAIEggFvBIIBawFpAHYA7s3QZNXbGs7FXLed tM0TojKHRny87N7DUUhZRnEftZsAAAGFq0gFIwAABAMARzBFAiEAqt+fK6jFdGA6 tv0EWt9rax0WYBV4re9jgZgq0zi42QUCIEBh1yKpPvgX1BreE0wBUmriOVUhJS77 KgF193fT2877AHcAc9meiRtMlnigIH1HneayxhzQUV5xGSqMa4AQesF3crUAAAGF q0gFnwAABAMASDBGAiEA12SUFK5rgLqRzvgcr7ZzV4nl+Zt9lloAzRLfPc7vSPAC IQCXPbwScx1rE+BjFawZlVjLj/1PsM0KQQcsfHDZJUTLwAB2AEiw42vapkc0D+Vq AvqdMOscUgHLVt0sgdm7v6s52IRzAAABhatIBV4AAAQDAEcwRQIhAN5bhHthoyWM J3CQB/1iYFEhMgUVkFhHDM/nlE9ThCwhAiAPvPJXyp7a2kzwJX3P7fqH5Xko3rPh CzRoXYd6W+QkCjANBgkqhkiG9w0BAQsFAAOCAQEAWeRK2KmCuppK8WMMbXYmdbM8 dL7F9z2nkZL4zwYtWBDt87jW/Gz/E5YyzU/phySFC3SiwvYP9afYfXaKrunJWCtu AG+5zSTuxELFTBaFnTRhOSO/xo6VyYSpsuVBD0R415W5z9l0v1hP5xb/fEAwxGxO Ik3Lg2c6k78rxcWcGvJDoSU7hPb3U26oha7eFHSRMAYN8gfUxAi6Q2TF4j/arMVB r6Q36EJ2dPcTu0p9NlmBm8dE34lzuTNC6GDCTWFdEloQ9u//M4kUUOjWn8a5XCs1 263t3Ta2JfKViqxpP5r+GvgVKG3qGFrC0mIYr0B4tfpeCY9T+cz4I6GDMSP0xg== -----END CERTIFICATE----- subject=/C=US/ST=California/L=Los Angeles/O=Internet\\xC2\\xA0Corporation\\xC2\\xA0for\\xC2\\xA0Assigned\\xC2\\xA0Names\\xC2\\xA0and\\xC2\\xA0Numbers/CN=www.example.org issuer=/C=US/O=DigiCert Inc/CN=DigiCert TLS RSA SHA256 2020 CA1 --- No client certificate CA names sent Server Temp Key: ECDH, P-256, 256 bits --- SSL handshake has read 3775 bytes and written 727 bytes --- New, TLSv1/SSLv3, Cipher is AEAD-AES256-GCM-SHA384 Server public key is 2048 bit Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.3 Cipher : AEAD-AES256-GCM-SHA384 Session-ID: Session-ID-ctx: Master-Key: Start Time: 1680325042 Timeout : 7200 (sec) Verify return code: 0 (ok) Bonus: use curl to connect specific IP for https hostname You may also use curl to resolve hostname to a specific IP. This is very useful when you want to connect HTTPS hostname with specific IP.\n--resolve \u0026lt;[+]host:port:addr[,addr]...\u0026gt; Provide a custom address for a specific host and port pair. Using this, you can make the curl requests(s) use a specified address and prevent the otherwise normally resolved address to be used. Consider it a sort of /etc/hosts alternative provided on the command line. The port number should be the number used for the specific protocol the host will be used for. It means you need several entries if you want to provide address for the same host but different ports. By specifying '*' as host you can tell curl to resolve any host and specific port pair to the specified address. Wildcard is resolved last so any --resolve with a specific host and port will be used first. The provided address set by this option will be used even if --ipv4 or --ipv6 is set to make curl use another IP version. By prefixing the host with a '+' you can make the entry time out after curl's default timeout (1 minute). Note that this will only make sense for long running parallel transfers with a lot of files. In such cases, if this option is used curl will try to resolve the host as it normally would once the timeout has expired. This option can be used many times to add many host names to resolve. --resolve can be used several times in a command line Example: curl --resolve example.com:443:127.0.0.1 https://example.com curl \u0026ndash;resolve Example:\ncurl -v https://www.example.com --resolve www.example.com:443:93.184.216.34 * Added www.example.com:443:93.184.216.34 to DNS cache * Hostname www.example.com was found in DNS cache * Trying 93.184.216.34:443... * Connected to www.example.com (93.184.216.34) port 443 (#0) ... Use -tls1_2 to test TLS 1.2 support To let openssl force use TLSv1.2 to check whether sever support TLS 1.2 (force TLS 1.2) or not:\n$ openssl s_client -connect dns.google:853 -tls1_2 CONNECTED(00000006) depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign verify return:1 depth=1 C = US, O = Google Trust Services, CN = GTS CA 1O1 verify return:1 depth=0 C = US, ST = California, L = Mountain View, O = Google LLC, CN = dns.google verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google LLC/CN=dns.google i:/C=US/O=Google Trust Services/CN=GTS CA 1O1 1 s:/C=US/O=Google Trust Services/CN=GTS CA 1O1 i:/OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign --- Server certificate -----BEGIN CERTIFICATE----- MIIGIjCCBQqgAwIBAgIRAJTRUTehSoT8AwAAAADDI0EwDQYJKoZIhvcNAQELBQAw ... MnwzXvYoyKQEc4sHj9scMKnXyM9Cgbqh0wGH0eaIscCNIu7ULeU= -----END CERTIFICATE----- subject=/C=US/ST=California/L=Mountain View/O=Google LLC/CN=dns.google issuer=/C=US/O=Google Trust Services/CN=GTS CA 1O1 --- No client certificate CA names sent Server Temp Key: ECDH, X25519, 253 bits --- SSL handshake has read 3351 bytes and written 281 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-RSA-CHACHA20-POLY1305 Server public key is 2048 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-RSA-CHACHA20-POLY1305 Session-ID: CC4A9A166E0DCF512A3206AC219AEFEB0496CBF05FB2EED933CB0AA942DACDD5 Session-ID-ctx: Master-Key: D930863734390E930804BC6818721FFD2416246EA08F7EF4060D2D45FAD6B66640BC2579B56EA3E3C9033DE556FC123E TLS session ticket lifetime hint: 100799 (seconds) TLS session ticket: 0000 - 01 56 db 77 af 6f 79 83-c8 d1 36 2b 85 d6 e4 15 .V.w.oy...6+.... 0010 - 33 3f 32 e0 90 c3 24 14-82 99 16 4f 2a 5e f9 e7 3?2...$....O*^.. 0020 - d0 30 fb 52 60 0c 16 f3-5b 72 7e ca 82 f3 66 2b .0.R`...[r~...f+ 0030 - 4e 4d 18 ed 2c ed 96 39-47 61 7f 24 df 17 5c 32 NM..,..9Ga.$..\\2 0040 - 92 f5 07 2b ed 9b 19 67-05 c0 c2 e8 89 51 18 dc ...+...g.....Q.. 0050 - f4 2e 67 68 64 18 b2 cb-cf 20 ca 0c 1a 3b 96 60 ..ghd.... ...;.` 0060 - 39 4d 51 b7 90 ba 6e 4d-6e 36 34 d5 a6 fe 5e 56 9MQ...nMn64...^V 0070 - 2f 7d bf 12 c6 22 59 6a-7c 91 79 a6 6a 25 59 dd /}...\u0026#34;Yj|.y.j%Y. 0080 - ce b1 43 25 e2 dc ca 90-f4 99 47 07 0b eb fb d8 ..C%......G..... 0090 - 7e 3a 2a 3d 77 fd 9a d1-c1 a8 3e 7d 6a 67 78 1e ~:*=w.....\u0026gt;}jgx. 00a0 - dc d9 ef 52 20 7b e9 10-a9 ab 66 c6 c1 a2 de dd ...R {....f..... 00b0 - 53 67 0d 56 17 1b d8 6f-20 2c cf e8 b9 77 26 f5 Sg.V...o ,...w\u0026amp;. 00c0 - 52 ce 7d d5 71 87 60 4e-b8 76 cb 3c 47 1e 71 b0 R.}.q.`N.v.\u0026lt;G.q. 00d0 - fc 1a c9 c3 75 a4 95 f7-8d 33 b5 2f e0 ....u....3./. Start Time: 1610933457 Timeout : 7200 (sec) Verify return code: 0 (ok) --- Test TLSv1.3 support Similar to force TLS 1.2, newer openssl support -tls1_3 option to test TLS 1.3 support (force TLS 1.3).\nHowever not all the openssl have -tls1_3 options. Alternative way is use an docker image with new openssl, like alpine/openssl:\n$ docker run --rm alpine/openssl s_client -connect cloudflare.com:443 -tls1_3 CONNECTED(00000003) depth=2 C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root verify return:1 depth=1 C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 verify return:1 depth=0 C = US, ST = California, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = cloudflare.com verify return:1 DONE --- Certificate chain 0 s:C = US, ST = California, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = cloudflare.com i:C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 1 s:C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 i:C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root --- Server certificate -----BEGIN CERTIFICATE----- MIIFYTCCBQigAwIBAgIQBsL7pLsusHbY3MmUQqCsHjAKBggqhkjOPQQDAjBKMQsw ... pu8FAiABVTdpTcSCEnk6WOA1UyiCotlMtX7NDPh8uJcfg1+bgg== -----END CERTIFICATE----- subject=C = US, ST = California, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = cloudflare.com issuer=C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 --- No client certificate CA names sent Peer signing digest: SHA256 Peer signature type: ECDSA Server Temp Key: X25519, 253 bits --- SSL handshake has read 2671 bytes and written 318 bytes Verification: OK --- New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384 Server public key is 256 bit Secure Renegotiation IS NOT supported No ALPN negotiated Early data was not sent Verify return code: 0 (ok) --- Test specific cipher suites for a TLS connection To test server cipher suites support. First use openssl ciphers -v command to see a list of supported available ciphers:\n$ openssl ciphers -v TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any Au=any Enc=CHACHA20/POLY1305(256) Mac=AEAD TLS_AES_128_GCM_SHA256 TLSv1.3 Kx=any Au=any Enc=AESGCM(128) Mac=AEAD ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH Au=ECDSA Enc=CHACHA20/POLY1305(256) Mac=AEAD ECDHE-RSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH Au=RSA Enc=CHACHA20/POLY1305(256) Mac=AEAD DHE-RSA-CHACHA20-POLY1305 TLSv1.2 Kx=DH Au=RSA Enc=CHACHA20/POLY1305(256) Mac=AEAD ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA384 ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA384 DHE-RSA-AES256-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(256) Mac=SHA256 ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA256 ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA256 DHE-RSA-AES128-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(128) Mac=SHA256 ECDHE-ECDSA-AES256-SHA TLSv1 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA1 ECDHE-RSA-AES256-SHA TLSv1 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1 DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1 ECDHE-ECDSA-AES128-SHA TLSv1 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA1 ECDHE-RSA-AES128-SHA TLSv1 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA1 DHE-RSA-AES128-SHA SSLv3 Kx=DH Au=RSA Enc=AES(128) Mac=SHA1 RSA-PSK-AES256-GCM-SHA384 TLSv1.2 Kx=RSAPSK Au=RSA Enc=AESGCM(256) Mac=AEAD DHE-PSK-AES256-GCM-SHA384 TLSv1.2 Kx=DHEPSK Au=PSK Enc=AESGCM(256) Mac=AEAD RSA-PSK-CHACHA20-POLY1305 TLSv1.2 Kx=RSAPSK Au=RSA Enc=CHACHA20/POLY1305(256) Mac=AEAD DHE-PSK-CHACHA20-POLY1305 TLSv1.2 Kx=DHEPSK Au=PSK Enc=CHACHA20/POLY1305(256) Mac=AEAD ECDHE-PSK-CHACHA20-POLY1305 TLSv1.2 Kx=ECDHEPSK Au=PSK Enc=CHACHA20/POLY1305(256) Mac=AEAD AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD PSK-AES256-GCM-SHA384 TLSv1.2 Kx=PSK Au=PSK Enc=AESGCM(256) Mac=AEAD PSK-CHACHA20-POLY1305 TLSv1.2 Kx=PSK Au=PSK Enc=CHACHA20/POLY1305(256) Mac=AEAD RSA-PSK-AES128-GCM-SHA256 TLSv1.2 Kx=RSAPSK Au=RSA Enc=AESGCM(128) Mac=AEAD DHE-PSK-AES128-GCM-SHA256 TLSv1.2 Kx=DHEPSK Au=PSK Enc=AESGCM(128) Mac=AEAD AES128-GCM-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(128) Mac=AEAD PSK-AES128-GCM-SHA256 TLSv1.2 Kx=PSK Au=PSK Enc=AESGCM(128) Mac=AEAD AES256-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA256 AES128-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA256 ECDHE-PSK-AES256-CBC-SHA384 TLSv1 Kx=ECDHEPSK Au=PSK Enc=AES(256) Mac=SHA384 ECDHE-PSK-AES256-CBC-SHA TLSv1 Kx=ECDHEPSK Au=PSK Enc=AES(256) Mac=SHA1 SRP-RSA-AES-256-CBC-SHA SSLv3 Kx=SRP Au=RSA Enc=AES(256) Mac=SHA1 SRP-AES-256-CBC-SHA SSLv3 Kx=SRP Au=SRP Enc=AES(256) Mac=SHA1 RSA-PSK-AES256-CBC-SHA384 TLSv1 Kx=RSAPSK Au=RSA Enc=AES(256) Mac=SHA384 DHE-PSK-AES256-CBC-SHA384 TLSv1 Kx=DHEPSK Au=PSK Enc=AES(256) Mac=SHA384 RSA-PSK-AES256-CBC-SHA SSLv3 Kx=RSAPSK Au=RSA Enc=AES(256) Mac=SHA1 DHE-PSK-AES256-CBC-SHA SSLv3 Kx=DHEPSK Au=PSK Enc=AES(256) Mac=SHA1 AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA1 PSK-AES256-CBC-SHA384 TLSv1 Kx=PSK Au=PSK Enc=AES(256) Mac=SHA384 PSK-AES256-CBC-SHA SSLv3 Kx=PSK Au=PSK Enc=AES(256) Mac=SHA1 ECDHE-PSK-AES128-CBC-SHA256 TLSv1 Kx=ECDHEPSK Au=PSK Enc=AES(128) Mac=SHA256 ECDHE-PSK-AES128-CBC-SHA TLSv1 Kx=ECDHEPSK Au=PSK Enc=AES(128) Mac=SHA1 SRP-RSA-AES-128-CBC-SHA SSLv3 Kx=SRP Au=RSA Enc=AES(128) Mac=SHA1 SRP-AES-128-CBC-SHA SSLv3 Kx=SRP Au=SRP Enc=AES(128) Mac=SHA1 RSA-PSK-AES128-CBC-SHA256 TLSv1 Kx=RSAPSK Au=RSA Enc=AES(128) Mac=SHA256 DHE-PSK-AES128-CBC-SHA256 TLSv1 Kx=DHEPSK Au=PSK Enc=AES(128) Mac=SHA256 RSA-PSK-AES128-CBC-SHA SSLv3 Kx=RSAPSK Au=RSA Enc=AES(128) Mac=SHA1 DHE-PSK-AES128-CBC-SHA SSLv3 Kx=DHEPSK Au=PSK Enc=AES(128) Mac=SHA1 AES128-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA1 PSK-AES128-CBC-SHA256 TLSv1 Kx=PSK Au=PSK Enc=AES(128) Mac=SHA256 PSK-AES128-CBC-SHA SSLv3 Kx=PSK Au=PSK Enc=AES(128) Mac=SHA1 Please note TLSv1.3 have fewer and stronger cipher options:\n$ openssl ciphers -v | grep v1.3 TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any Au=any Enc=CHACHA20/POLY1305(256) Mac=AEAD TLS_AES_128_GCM_SHA256 TLSv1.3 Kx=any Au=any Enc=AESGCM(128) Mac=AEAD Note for TLSv1.3 A TLS-compliant application MUST implement the TLS_AES_128_GCM_SHA256 cipher suite and SHOULD implement the TLS_AES_256_GCM_SHA384 and TLS_CHACHA20_POLY1305_SHA256 cipher suites. see also RFC8439: ChaCha20 and Poly1305 for IETF Protocols . An example of use -ciphersuites to specific TLS_AES_256_GCM_SHA384 cipher in TLS 1.3:\n$ docker run --rm alpine/openssl s_client -connect www.cloudflare.com:443 -tls1_3 -ciphersuites \u0026#39;TLS_AES_256_GCM_SHA384\u0026#39; CONNECTED(00000003) depth=2 C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root verify return:1 depth=1 C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 verify return:1 depth=0 C = US, ST = California, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = cloudflare.com verify return:1 DONE --- Certificate chain 0 s:C = US, ST = California, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = cloudflare.com i:C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 1 s:C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 i:C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root --- Server certificate -----BEGIN CERTIFICATE----- MIIFYTCCBQigAwIBAgIQBsL7pLsusHbY3MmUQqCsHjAKBggqhkjOPQQDAjBKMQsw ... pu8FAiABVTdpTcSCEnk6WOA1UyiCotlMtX7NDPh8uJcfg1+bgg== -----END CERTIFICATE----- subject=C = US, ST = California, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = cloudflare.com issuer=C = US, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = Cloudflare Inc ECC CA-3 --- No client certificate CA names sent Peer signing digest: SHA256 Peer signature type: ECDSA Server Temp Key: X25519, 253 bits --- SSL handshake has read 2672 bytes and written 320 bytes Verification: OK --- New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384 Server public key is 256 bit Secure Renegotiation IS NOT supported No ALPN negotiated Early data was not sent Verify return code: 0 (ok) --- At the end of output, cipher TLS_AES_256_GCM_SHA384 is confirmed.\nNote TLS 1.3 Key differences with TLS1.2 and below\nTLSv1.3 is a major rewrite of the specification. There was some debate as to whether it should really be called TLSv2.0 - but TLSv1.3 it is. There are major changes and some things work very differently. A brief, incomplete, summary of some things that you are likely to notice follows:\n There are new ciphersuites that only work in TLSv1.3. The old ciphersuites cannot be used for TLSv1.3 connections. The new ciphersuites are defined differently and do not specify the certificate type (e.g. RSA, DSA, ECDSA) or the key exchange mechanism (e.g. DHE or ECHDE). This has implications for ciphersuite configuration. Clients provide a “key_share” in the ClientHello. This has consequences for “group” configuration. Sessions are not established until after the main handshake has been completed. There may be a gap between the end of the handshake and the establishment of a session (or, in theory, a session may not be established at all). This could have impacts on session resumption code. Renegotiation is not possible in a TLSv1.3 connection More of the handshake is now encrypted. More types of messages can now have extensions (this has an impact on the custom extension APIs and Certificate Transparency) DSA certificates are no longer allowed in TLSv1.3 connections Source: https://www.openssl.org/blog/blog/2017/05/04/tlsv1.3/ \n Extract server public certificate Extract server public certificate into a PEM encoded file:\n$ echo -n | openssl s_client -connect www.example.com:443 -servername www.example.com | sed -ne \u0026#39;/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p\u0026#39; \u0026gt; cert.pem $ cat cert.pem -----BEGIN CERTIFICATE----- MIIG1TCCBb2gAwIBAgIQD74IsIVNBXOKsMzhya/uyTANBgkqhkiG9w0BAQsFADBP MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSkwJwYDVQ ... vUzLnF7QYsJhvYtaYrZ2MLxGD+NFI8BkXw== -----END CERTIFICATE----- Troubleshooting on get invalid certifate \u0026ldquo;Issuer: OU=No SNI provided; please fix your client., CN=invalid2.invalid\u0026rdquo; Incase you get certificate with following subject:\n Issuer: OU=No SNI provided; please fix your client., CN=invalid2.invalid\n Try to add -servername \u0026lt;server-dns-name\u0026gt; to s_client (see above as example). -servername val set TLS extension servername (SNI) in ClientHello.\nDecode PEM encoded certificate file In previous example, we export server public certificate into a PEM encoded file. To view the certificate info, use following openssl x509 command to dump certificate content:\n$ openssl x509 -in cert.pem -text -noout Certificate: Data: Version: 3 (0x2) Serial Number: 02:52:16:e1:c4:99:8e:26:32:aa:5d:1d:a9:85:b4:3c Signature Algorithm: sha256WithRSAEncryption Issuer: C=US, O=DigiCert Inc, CN=DigiCert TLS RSA SHA256 2020 CA1 Validity Not Before: Dec 10 00:00:00 2021 GMT Not After : Dec 9 23:59:59 2022 GMT Subject: C=US, ST=California, L=Los Angeles, O=Verizon Digital Media Services, Inc., CN=www.example.org Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:a0:30:42:56:d7:0b:a1:11:b9:f3:0b:ec:cc:f2: 4c:b0:6f:13:02:6b:cf:07:f3:85:f0:42:8f:c5:54: 98:81:6e:7a:93:38:b6:fa:46:42:b3:5c:e6:c9:3b: 59:93:61:24:43:20:f5:7a:89:c9:77:ad:ff:87:c8: 08:db:86:f5:dc:61:75:96:5f:dc:f0:08:ca:3a:b9: 5e:0f:fa:37:7c:65:6a:ca:08:27:1e:9d:d8:0a:3f: 9e:10:db:45:25:9a:03:72:ba:f5:27:d9:b0:eb:36: d4:93:39:8c:11:6c:5f:33:14:58:e5:c0:88:c5:1f: 7a:21:14:cc:d2:a7:5f:1c:73:1f:d9:03:20:6e:7a: 08:ef:17:4e:e3:be:28:c0:4f:e0:71:63:21:04:77: 8f:8f:4b:2b:e8:0b:a2:be:97:7e:50:6f:b8:3b:37: 63:7f:a4:0c:99:ff:96:a2:c3:7f:ca:7c:21:ba:fd: 90:d1:3f:05:a4:34:70:d6:84:8e:a5:00:dc:29:7c: fd:96:cb:43:ae:39:8f:2d:c6:ad:d8:c2:1d:9b:e4: 5f:9c:51:9c:8b:fe:6d:49:62:5b:c7:cd:1e:18:96: ce:c6:2a:07:b7:71:80:60:72:ac:57:12:00:90:43: 0f:23:be:a9:70:71:d6:e5:7b:85:a3:4d:05:88:21: c7:23 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Authority Key Identifier: keyid:B7:6B:A2:EA:A8:AA:84:8C:79:EA:B4:DA:0F:98:B2:C5:95:76:B9:F4 X509v3 Subject Key Identifier: 6D:E0:FA:A4:C8:6F:2B:37:0E:0D:4D:C8:12:9A:D1:07:81:68:60:44 X509v3 Subject Alternative Name: DNS:www.example.org, DNS:example.net, DNS:example.edu, DNS:example.com, DNS:example.org, DNS:www.example.com, DNS:www.example.edu, DNS:www.example.net X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication X509v3 CRL Distribution Points: Full Name: URI:http://crl3.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl Full Name: URI:http://crl4.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl X509v3 Certificate Policies: Policy: 2.23.140.1.2.2 CPS: http://www.digicert.com/CPS Authority Information Access: OCSP - URI:http://ocsp.digicert.com CA Issuers - URI:http://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1-1.crt X509v3 Basic Constraints: critical CA:FALSE 1.3.6.1.4.1.11129.2.4.2: ...i.g.v.F.U.u.. 0...i..}.,At..I.....p.mG...}...p.....G0E.!...(..Q1k.. ......../C.H..u....... CG .r..7|...S.rIyo.[.......G.....u.A....\u0026#34;FJ...:.B.^N1.....K.h..b......}...\u0026lt;.....F0D. {3No^.}..Dl........E..8..;U.8.... .....F...B.^y.f.|3..4.....\u0026#34;..5.%.v...^.h.O.l..._N\u0026gt;Z.....j^.;.. D\\*s...}...v.....G0E.!.... :.V.3....3..Q..vsC.c;.%w.HM.... Signature Algorithm: sha256WithRSAEncryption a5:54:34:69:fe:fb:03:6b:f1:a8:1d:5a:36:79:59:8f:5c:62: a2:63:99:04:d0:63:78:39:56:44:0c:35:a2:62:5c:88:af:7a: 10:d4:4d:c1:4f:aa:d7:e2:99:39:55:95:5a:df:2c:6c:58:44: 03:99:af:39:06:a1:08:d4:7f:df:48:28:95:b8:65:43:90:d1: 60:ec:2a:86:a8:c1:4d:6a:7f:3a:46:4f:06:eb:8f:39:9e:77: 61:db:2e:54:cf:f0:d8:d0:a5:83:cc:10:82:22:45:05:02:d6: 25:0a:fb:49:5f:d1:43:aa:e6:62:c9:dc:2a:b7:c8:bf:54:6c: ec:a1:61:35:fd:85:ad:39:73:9f:e7:64:7b:e1:c0:23:6f:ca: 27:b9:45:3e:a3:58:b7:0c:1f:af:61:3d:2d:83:1a:25:6b:f0: 71:b8:89:5d:56:d4:5d:ff:5f:e1:de:04:eb:04:a3:56:32:62: 52:08:48:21:c1:ef:60:a2:8e:48:b6:42:20:07:cc:fa:b2:ef: 51:fd:30:3b:7d:8c:7d:a3:6d:82:95:44:80:d1:27:6d:1e:17: 66:35:fa:b9:3b:a9:08:f0:2e:80:4c:e3:80:1f:5b:d3:7b:9f: a7:84:ba:fd:87:11:69:da:54:1c:a6:a1:48:c7:69:21:33:63: 27:73:54:e8 Note PEM certificate should start with \u0026ldquo;\u0026mdash;\u0026ndash;BEGIN CERTIFICATE\u0026mdash;\u0026ndash;\u0026rdquo; and end with \u0026ldquo;\u0026mdash;\u0026ndash;END CERTIFICATE\u0026mdash;\u0026ndash;\u0026rdquo; Use -starttls to upgrade a plain text connection to an encrypted (TLS or SSL) connection STARTTLSoffer a way to upgrade a plain text connection to an encrypted (TLS or SSL) connection instead of using a separate port for encrypted communication.\nSeveral protocols like STMP, IMAP, XMPP, NNTP use a command named \u0026ldquo;STARTTLS\u0026rdquo; for this purpose. FTP uses the command AUTH TLS.\nopenssl provide -starttls prot to test STARTTLS support:\n-starttls prot - use the STARTTLS command before starting TLS for those protocols that support it, where \u0026#39;prot\u0026#39; defines which one to assume. Currently, only \u0026#34;smtp\u0026#34;, \u0026#34;lmtp\u0026#34;, \u0026#34;pop3\u0026#34;, \u0026#34;imap\u0026#34;, \u0026#34;ftp\u0026#34; and \u0026#34;xmpp\u0026#34; are supported. For example, Gmail use port 587 for STARTTLS connection, use the following command to test it, we can the TLS connection setup process, server certificate, handshake, cipher etc.\nAfter connection is established, can send SMTP command like HELO smtp.gmail.com and get response from server.\n$ openssl s_client -connect smtp.gmail.com:587 -starttls smtp CONNECTED(00000005) depth=3 C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA verify return:1 depth=2 C = US, O = Google Trust Services LLC, CN = GTS Root R1 verify return:1 depth=1 C = US, O = Google Trust Services LLC, CN = GTS CA 1C3 verify return:1 depth=0 CN = smtp.gmail.com verify return:1 --- Certificate chain 0 s:/CN=smtp.gmail.com i:/C=US/O=Google Trust Services LLC/CN=GTS CA 1C3 1 s:/C=US/O=Google Trust Services LLC/CN=GTS CA 1C3 i:/C=US/O=Google Trust Services LLC/CN=GTS Root R1 2 s:/C=US/O=Google Trust Services LLC/CN=GTS Root R1 i:/C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA --- Server certificate -----BEGIN CERTIFICATE----- MIIEiTCCA3GgAwIBAgIRAPNAL8G1pyR+CgAAAAEl/6IwDQYJKoZIhvcNAQELBQAw ... dos6Ztuq+2pId4qBas9cdxN8m+eW28cp+XLXNqwwQADdpdZ2Frl627dE3V5wU0GV tE07IhnSNQlCqCIOUg== -----END CERTIFICATE----- subject=/CN=smtp.gmail.com issuer=/C=US/O=Google Trust Services LLC/CN=GTS CA 1C3 --- No client certificate CA names sent Server Temp Key: ECDH, X25519, 253 bits --- SSL handshake has read 4726 bytes and written 316 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-CHACHA20-POLY1305 Server public key is 256 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-ECDSA-CHACHA20-POLY1305 Session-ID: BF8E5684C0E47150A48E865BBB2412E732D0F9F5C615BE9F287124744E57CFF5 Session-ID-ctx: Master-Key: A1685E5E75EF0B2C4104F524B2BEDD81A230687F667150AE14EBFE0AAE72A17B8D4F2FCF93EB096E268F9D0EA658216C TLS session ticket lifetime hint: 100800 (seconds) TLS session ticket: 0000 - 01 6e 80 8a c5 3f 5e fa-a6 a6 9f 24 68 5d f4 61 .n...?^....$h].a 0010 - bf ff 54 8e 26 a4 ac 05-54 28 3c 88 39 be 08 db ..T.\u0026amp;...T(\u0026lt;.9... 0020 - 37 3b 5c 7f 49 3e d7 06-19 3a b5 0f 1a 1e 2c 38 7;\\.I\u0026gt;...:....,8 0030 - 28 92 3f c5 dd dc ea 63-d1 27 76 30 46 a4 39 99 (.?....c.\u0026#39;v0F.9. 0040 - a0 87 cd 64 d6 1b f8 31-81 79 e7 de 8e ed 00 40 ...d...1.y.....@ 0050 - 5b aa 68 2e 1d 1e 28 de-76 94 dc 78 f3 12 db 81 [.h...(.v..x.... 0060 - 04 81 2d 81 7a a8 43 0d-2a 68 fe 4c 82 de 6c 3c ..-.z.C.*h.L..l\u0026lt; 0070 - e0 8b 9e 67 d7 65 ce c5-3b 39 52 18 a3 d3 8b 82 ...g.e..;9R..... 0080 - ec 6f 7b a0 e7 ae 15 e0-bb 9c 2b 02 f1 e3 55 b8 .o{.......+...U. 0090 - b4 6d 5a 18 ad a7 04 dd-38 70 d3 6a 09 91 34 1c .mZ.....8p.j..4. 00a0 - 5c 64 1c 96 3f 5c 7d 78-9f 03 e9 52 bc 43 8f 32 \\d..?\\}x...R.C.2 00b0 - 1b 91 1f dc a9 16 7b cd-72 a5 d9 58 49 d4 02 ca ......{.r..XI... 00c0 - d2 f1 45 9c ae ab e6 d0-7b 2d 9e a0 94 04 e1 f8 ..E.....{-...... 00d0 - ea e8 9b 0a 21 d4 57 5a-6b df db b4 48 ....!.WZk...H Start Time: 1639810577 Timeout : 7200 (sec) Verify return code: 0 (ok) --- 250 SMTPUTF8 HELO smtp.gmail.com 250 smtp.gmail.com at your service Sample error when connect to non-TLS server $ openssl s_client -connect example.com:80 Connecting to 93.184.215.14 CONNECTED(00000005) 006112F701000000:error:0A0000C6:SSL routines:tls_get_more_records:packet length too long:ssl/record/methods/tls_common.c:655: 006112F701000000:error:0A000139:SSL routines::record layer failure:ssl/record/rec_layer_s3.c:692: --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 5 bytes and written 326 bytes Verification: OK --- New, (NONE), Cipher is (NONE) This TLS version forbids renegotiation. Compression: NONE Expansion: NONE No ALPN negotiated Early data was not sent Verify return code: 0 (ok) --- Summary: openssl s_client command examples quick references Test TLS connection:\nopenssl s_client -connect www.google.com:443\n Show all certificates chain:\nopenssl s_client -connect dns.google:853 -showcerts\n Extract server public certificate:\necho -n | openssl s_client -connect www.example.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \u0026gt; cert.pem\n Use specific version of TLS:\nopenssl s_client -connect dns.google:853 -tls1_2\n Specific ciphersuites for a TLS connection:\nopenssl s_client -connect www.cloudflare.com:443 -tls1_3 -ciphersuites 'TLS_AES_256_GCM_SHA384'\n Use -starttls to upgrade a plain text connection to an encrypted (TLS or SSL) connection:\nopenssl s_client -connect smtp.gmail.com:587 -starttls smtp\n Decode PEM encoded certificate file:\n$ openssl x509 -in cert.pem -text -noout\n Use docker to run openssl:\ndocker run --rm alpine/openssl s_client -connect cloudflare.com:443 -tls1_3\n Related pages: Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security OpenSSL CSR Examples: Self Signed Certificate and How to Start Test TLS/SSL Server/Client testssl.sh examples command line tool check server TLS/SSL (weak) ciphers and detect TLS/SSL vulnerabilities ECDSA signature verify in kotlin and Golang Running a DoH Client to encrypt all home DNS traffic Secure Squid Proxy Server References man page: openssl-s_client - SSL/TLS client program man page: openssl-x509 - Certificate display and signing command Using TLS1.3 With OpenSSL RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 ","excerpt":"Introduction openssl s_client is an SSL/TLS client program that can be used to test TLS server …","ref":"https://djangocas.dev/blog/test-tls-connectivity-with-openssl/","title":"Test TLS Connection Ciphers TLS Version and Certificate with OpenSSL Command Line"},{"body":"SO_BINDTODEVICE on Linux In Linux, SO_BINDTODEVICE is a socket option can be used in setsockopt() to bind a socket to network interface. e.g.\n#include \u0026lt;sys/types.h\u0026gt;#include \u0026lt;sys/socket.h\u0026gt; const char *interface_name = \u0026#34;eth0\u0026#34;; setsockopt(socket_fd, SOL_SOCKET, SO_BINDTODEVICE, interface_name, strlen(interface_name)); SO_BINDTODEVICE\nBind this socket to a particular device like \u0026ldquo;eth0\u0026rdquo;, as specified in the passed interface name. If the name is an empty string or the option length is zero, the socket device binding is removed. The passed option is a variable-length null-terminated interface name string with the maximum size of IFNAMSIZ. If a socket is bound to an interface, only packets received from that particular interface are processed by the socket. Note that this only works for some socket types, particularly AF_INET sockets. It is not supported for packet sockets (use normal bind(2) there).\nBefore Linux 3.8, this socket option could be set, but could not retrieved with getsockopt(2). Since Linux 3.8, it is readable. The optlen argument should contain the buffer size available to receive the device name and is recommended to be IFNAMSZ bytes. The real device name length is reported back in the optlen argument.\n IP_BOUND_IF on Mac In Mac, there is no SO_BINDTODEVICE, the corresponding option is IP_BOUND_IF:\n IP_BOUND_IF\nLimit reception and transmission of packets to this interface. Takes an integer as an argument. The integer is the selected interface index.\n Please note, setsockopt() return -1 indicate error and error code store in errno.\nExample code to use IP_BOUND_IF in setsockopt().\nFor IPv4:\n#include \u0026lt;sys/types.h\u0026gt;#include \u0026lt;sys/socket.h\u0026gt;#include \u0026lt;net/if.h\u0026gt; const char *interface = \u0026#34;en0\u0026#34;; int index = if_nametoindex(interface); if (index == 0) { // if_nametoindex() return 0 if interface not exist. return NOT_FOUND; } if (setsockopt(socket_fd, IPPROTO_IP, IP_BOUND_IF, \u0026amp;index, sizeof(index)) == -1) { return errno; } The if_nametoindex() function maps the interface name specified in ifname to its corresponding index.\nIf the specified interface does not exist, it returns 0.\n For IPv6, need replace IPPROTO_IP with IPPROTO_IPV6, IP_BOUND_IF with IPV6_BOUND_IF, e.g.\nif (setsockopt(socket_fd, IPPROTO_IPV6, IPV6_BOUND_IF, \u0026amp;index, sizeof(index)) == -1) { return errno; } Excerpt sample usage in Apple source code mDNSResponder/mDNSMacOSX.c :\n Hint: search IP_BOUND_IF and IPV6_BOUND_IF.\n if (dst-\u0026gt;type == mDNSAddrType_IPv4) { #ifdef IP_BOUND_IF if (info) setsockopt(*s, IPPROTO_IP, IP_BOUND_IF, \u0026amp;info-\u0026gt;scope_id, sizeof(info-\u0026gt;scope_id)); else { LogMsg(\u0026#34;mDNSPlatformTCPConnect: Invalid interface index %p\u0026#34;, InterfaceID); return mStatus_BadParamErr; } #else (void)InterfaceID; // Unused (void)info; // Unused #endif } else { #ifdef IPV6_BOUND_IF if (info) setsockopt(*s, IPPROTO_IPV6, IPV6_BOUND_IF, \u0026amp;info-\u0026gt;scope_id, sizeof(info-\u0026gt;scope_id)); else { LogMsg(\u0026#34;mDNSPlatformTCPConnect: Invalid interface index %p\u0026#34;, InterfaceID); return mStatus_BadParamErr; } #else (void)InterfaceID; // Unused (void)info; // Unused #endif } IP_BOUND_IF and IPV6_BOUND_IF defined in netinet/in.h:\n// netinet/in.h #define IP_BOUND_IF 25 /* int; set/get bound interface */#define IPV6_BOUND_IF 125 /* int; set/get bound interface */Troubleshooting setsockopt() return -1 and errno is 22 22 is invalid argument. For IPv4, make sure call setsockopt() with IPPROTO_IP, not IPPROTO_IPV4.\n22: Invalid argument References man socket man ip section 7 Apple Developer Form: Need to route Data traffic netinet/in.h on Mac mDNSResponder/mDNSMacOSX.c ","excerpt":"SO_BINDTODEVICE on Linux In Linux, SO_BINDTODEVICE is a socket option can be used in setsockopt() …","ref":"https://djangocas.dev/blog/linux/linux-SO_BINDTODEVICE-and-mac-IP_BOUND_IF-to-bind-socket-to-a-network-interface/","title":"Use Linux SO_BINDTODEVICE and mac IP_BOUND_IF to bind socket to a network interface"},{"body":"Why Need Find Global Variables In rails, if you want to use puma as rails server, you need make sure your app is thread safe, not only your app code itself, also 3rd party gems should also thread safe.\nOne of requirement for thread safe is avoid global variables.\nGlobal variables are dangerous because they can be written to from anywhere. Overuse of globals can make isolating bugs difficult; it also tends to indicate that the design of a program has not been carefully thought out. Whenever you do find it necessary to use a global variable, be sure to give it a descriptive name that is unlikely to be inadvertently used for something else later (calling it something like $foo as above is probably a bad idea).\nRuby Global Variables According ruby doc, global variable has a name beginning with $:\n A global variable has a name beginning with $. It can be referred to from anywhere in a program. Before initialization, a global variable has the special value nil.\nhttps://ruby-doc.org/docs/ruby-doc-bundle/UsersGuide/rg/globalvars.html Find Global Variables If ruby code follow ruby name convention to use $ as prefix of global variable, we can do text search with regular expression.\nOne of best tools to do code text search is ripgrep Install ripgrep If you\u0026rsquo;re a macOS Homebrew or a Linuxbrew user, then you can install ripgrep from homebrew-core:\n$ brew install ripgrep If you\u0026rsquo;re a MacPorts user, then you can install ripgrep from the official ports:\n$ sudo port install ripgrep If you\u0026rsquo;re a Windows Chocolatey user, then you can install ripgrep from the official repo:\n$ choco install ripgrep If you\u0026rsquo;re a Windows Scoop user, then you can install ripgrep from the official bucket:\n$ scoop install ripgrep If you\u0026rsquo;re an Arch Linux user, then you can install ripgrep from the official repos:\n$ pacman -S ripgrep If you\u0026rsquo;re a Gentoo user, you can install ripgrep from the official repo:\n$ emerge sys-apps/ripgrep If you\u0026rsquo;re a Fedora user, you can install ripgrep from official repositories.\n$ sudo dnf install ripgrep If you\u0026rsquo;re an openSUSE user, ripgrep is included in openSUSE Tumbleweed and openSUSE Leap since 15.1.\n$ sudo zypper install ripgrep If you\u0026rsquo;re a RHEL/CentOS 7/8 user, you can install ripgrep from copr:\n$ sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo $ sudo yum install ripgrep Find the global variables with ripgrep I use rbenv, so search the rbenv path like ~/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/.\nRegular expression '\\$[a-zA-Z0-9]+[ ]*[=]' will try to match global variable starts with $ and there is a = in the same line.\nHere is an example:\n$ rg -truby \u0026#39;\\$[a-zA-Z0-9]+[ ]*[=]\u0026#39; ~/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/ ... ... ~/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/resque-1.27.4/lib/resque/worker.rb 352: $0 = \u0026#34;resque: Starting\u0026#34; 840: $0 = \u0026#34;#{ENV[\u0026#39;RESQUE_PROCLINE_PREFIX\u0026#39;]}resque-#{Resque::Version}: #{string}\u0026#34; ... ... References Ruby user\u0026rsquo;s guide: Global variables ripgrep ","excerpt":"Why Need Find Global Variables In rails, if you want to use puma as rails server, you need make sure …","ref":"https://djangocas.dev/blog/ruby-find-3rd-party-gems-global-vars/","title":"Find 3rd party gems global variables in ruby"},{"body":"What is Search Job Inspector The Search Job Inspector and the Job Details dashboard are tools that let you take a closer look at what your search is doing and see where the Splunk software is spending most of its time.\nSearch Job Inspector allows you to examine:\n Overall stats of search (e.g., records processed and returned, processing time) How search was processed Where Splunk spent its time Use to troubleshoot search’s performance and understand impact of knowledge objects on processing (e.g., event types, tags, lookups) Any existing (i.e., not expired) search job can be inspected Search Job Inspector – 3 Components The Job Details dashboard displays basic search job facts and metrics, shows you the search strings that were run in the background to carry out the search, and gives you a concise overview of search costs and indexer usage metrics.\nSearch Job Inspector have 3 components:\n Header Execution costs Search job properties Search Job Inspector – Header Top of Search job inspector provides basic information, including time to run and # of events scanned\nSearch Job Inspector – Execution Costs Search Job Inspector – Execution Costs Provides details on cost to retrieve results, such as:\n command.search.index Time to search the index for the location to read in rawdata files command.search.filter Time to filter out events that do not match command.search.rawdata Time to read events from the raw data files The command.search component, and everything under it, gives you the performance impact of the search command portion of your search, which is everything before the pipe character.\nThe command.prededup gives you the performance impact of processing the results of the search command before passing it into the dedup command.\n The Input count of command.prededup matches the Output count of command.search. The Input count of command.dedup matches the Output count of command.prededup. In this case, the Output count of command.prededup should match the number of events returned at the completion of the search. This is the value of resultCount, under Search job properties.\nSearch Job Inspector – Search Job Properties The Search job properties fields provide information about the search job.\nExample:\n Produces scanCount of 127,201 events Returns resultCount of 2,144 in 3.01 seconds To calculate performance: Do not use resultCount/time 2,144 / 3.01 = 712 EPS Rather, calculate scanCount/time 127,201/ 3.01 = 40,892 EPS EPS= events per second\n Troubleshooting Notes When troubleshooting search performance, it\u0026rsquo;s important to understand the difference between the scanCount and resultCount costs. For dense searches, the scanCount and resultCount are similar (scanCount = resultCount); and for sparse searches, the scanCount is much greater than the result count (scanCount \u0026raquo; resultCount).\n scanCount The number of events that are scanned or read off disk. resultCount The total number of results returned by the search. Search performance should not so much be measured using the resultCount/time rate but scanCount/time instead. Typically, the scanCount/second event rate should hover between 10k and 20k events per second for performance to be deemed good.\nSearch Job Inspector Debug Messages Configure the Search Job Inspector to display DEBUG messages when there are errors in your search. For example, DEBUG messages can warn you when there are fields missing from your results.\nThe Search Job Inspector displays DEBUG messages at the top of the Search Job Inspector window, after the search has completed.\nBy default the Search Job Inspector hides DEBUG messages.\nRelated pages: Splunk != vs. NOT Difference Detail Explained with Examples Splunk Search Best Practices for Better Performance Response Time Install Splunk and Forwarder on Linux References Splunk: View search job properties ","excerpt":"What is Search Job Inspector The Search Job Inspector and the Job Details dashboard are tools that …","ref":"https://djangocas.dev/blog/splunk/troubleshooting-splunk-search-performance-by-search-job-inspector/","title":"Troubleshooting Splunk Search Performance by Search Job Inspector"},{"body":"When you want to exclude results from your search you can use the NOT operator or the != field expression.\nHowever there is a significant difference in the results that are returned from these two methods.\n!= vs. NOT Comparison Both!= field expression and NOT operator exclude events from your search, but produce different results Example: status != 200 Returns events where status field exists and value in field doesn’t equal 200 Example: NOT status = 200 Returns events where status field exists and value in field doesn’t equal 200 \u0026ndash; and all events where status field doesn’t exist Does != and NOT ever yield the same results? Yes, if you know the field you’re evaluating always exists in the data you’re searching For example: index=web sourcetype=access_combined status!=200 index=web sourcetype=access_combined NOT status=200 yields same results because status field always exists in access_combined sourcetype. Searching with != or NOT is not efficient Using the != expression or NOT operator to exclude events from your search results is not an efficient method of filtering events. The execution cost for a search is actually less when you explicitly specify the values that you want to include in the search results.\nRelated pages: Troubleshooting Splunk Search Performance by Search Job Inspector Splunk Search Best Practices for Better Performance Response Time Install Splunk and Forwarder on Linux Reference Difference between NOT and != ","excerpt":"When you want to exclude results from your search you can use the NOT operator or the != field …","ref":"https://djangocas.dev/blog/splunk-search-not-equal-vs-not/","title":"Splunk != vs. NOT Difference Detail Explained with Examples"},{"body":"Splunk search best practices, a quick guideline on splunk search, write better search to improve your search quality and boost query time. Notes from Splunk Fundamentals.\nTime is the most efficient filter keep the time range short (e.g. last 60 minutes) to reduce query time.\nSpecifying a narrow time range is a great way to filter the data in your dataset and to reduce query time and avoid producing more results.\nAn example of using a time range in a search that goes back 5 minutes, snapping to the beginning of the minute. The end of the time range is the beginning of the current minute.\n| from main where earliest=-5m@m and latest=@m Limit the number of events retrieved By default, a Splunk search retrieves all events. However in some situations you might want to retrieve a sample set of events, instead of retrieving the entire event set. Limiting the number of events retrieved is useful in several situations:\n You are creating a search and want to determine if you are retrieving the correct events You need only a subset or sample set of events for your search You can specify a limit to the number of events retrieved in a couple of ways:\nUse the head command The head command retrieves only the most recent N events for a historical search, or the first N captured events for a realtime search. For example:\nindex=foo status=404 | head 1000 ... Use event sampling Event sampling uses a ratio that you specify to select events. For example, if the sample ratio value is 100, each event has a 1 in 100 chance of being included in the result set. To learn more about event sampling and sampling ratios, see Event sampling.\nBy default, event sampling is not active. You must specify a sampling ratio before you run your search. In Splunk Web, click the Sampling drop-down and choose a sampling ratio.\nSpecify one or more index values at the beginning of your search string specify multiple index values in a search Use OR to search multiple indexes:\n(index=foo OR index=bar) \u0026#34;fun\u0026#34; use a wildcard (*) in index values index=foo* \u0026#34;fun\u0026#34; Hint For best performance, specify the index values at the beginning of the search string. Include as many search terms as possible If you want to find events with \u0026quot;error\u0026quot; and \u0026quot;sshd\u0026quot;, and 90% of the events include \u0026quot;error\u0026quot; but only 5% \u0026quot;sshd\u0026quot;, include both values in the search:\n\u0026#34;error\u0026#34; AND \u0026#34;sshd\u0026#34; Make your search terms as specific as possible Searching for \u0026quot;access denied\u0026quot; is always better than searching for \u0026quot;denied\u0026quot;\nInclusion is generally better than exclusion (NOT) Searching for \u0026quot;access denied\u0026quot; is faster than searching for NOT \u0026quot;access granted\u0026quot;\nMore resources are used tracking NOT expressions than if you specify what you are looking for. Where ever possible, avoid using NOT expressions. For example, instead of using a string of NOT or != expressions such as:\n(NOT host=d NOT host=e) or\n(host!=d AND host!=e) Use the specific terms you are searching for:\n(host=a OR host=b OR host=c). Filter as early as possible For example, remove duplicate events, then sort.\nThe sooner filters and required fields are added to a search, the faster the search will run. It is always best to filter in the foundation of the search if possible.\nslower:\nindex=foo | stats count by host | search host=\u0026#34;bar\u0026#34; faster:\nindex=foo host=\u0026#34;bar\u0026#34; | stats count by host Avoid using wildcards at the beginning or middle of a string Wildcards at beginning of string scan all events within timeframe Wildcards in middle of string may return inconsistent results So use fail* (not *fail or *fail* or f*il) When possible, use OR instead of wildcards For example, use (user=admin OR user=administrator) instead of user=admin* Hint Remember, field names are case sensitive and field values are case insensitive. Troubleshooting a slow search: Use the Search Job Inspector When you wrote a search take a long time, what can you do?\nThe Search Job Inspector is a tool you can use both to troubleshoot the performance of a search and to determine which phase of the search takes the greatest amounts of time. It dissects the behavior of your searches to help you understand the execution costs of knowledge objects such as event types, tags, lookups, search commands, and other components within the search.\nRelated pages: Troubleshooting Splunk Search Performance by Search Job Inspector Splunk != vs. NOT Difference Detail Explained with Examples Install Splunk and Forwarder on Linux References Searching specific time ranges Write better searches Quick tips for optimization Splunk \u0026gt; Clara-fication: Search Best Practices Search Job Inspector ","excerpt":"Splunk search best practices, a quick guideline on splunk search, write better search to improve …","ref":"https://djangocas.dev/blog/splunk/splunk-search-best-practices-for-better-performance-response-time/","title":"Splunk Search Best Practices for Better Performance Response Time"},{"body":"Install Splunk Download from https://www.splunk.com/en_us/download/splunk-enterprise Download Splunk 8 via Command Line (wget):\n# .deb For Debian and Ubuntu $ wget -O splunk-8.0.3-a6754d8441bf-linux-2.6-amd64.deb \u0026#39;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64\u0026amp;platform=linux\u0026amp;version=8.0.3\u0026amp;product=splunk\u0026amp;filename=splunk-8.0.3-a6754d8441bf-linux-2.6-amd64.deb\u0026amp;wget=true\u0026#39; # .rpm For Redhat and CentOS $ wget -O splunk-8.0.3-a6754d8441bf-linux-2.6-x86_64.rpm \u0026#39;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64\u0026amp;platform=linux\u0026amp;version=8.0.3\u0026amp;product=splunk\u0026amp;filename=splunk-8.0.3-a6754d8441bf-linux-2.6-x86_64.rpm\u0026amp;wget=true\u0026#39; # .tgz For all Linux platforms $ wget -O splunk-8.0.3-a6754d8441bf-Linux-x86_64.tgz \u0026#39;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64\u0026amp;platform=linux\u0026amp;version=8.0.3\u0026amp;product=splunk\u0026amp;filename=splunk-8.0.3-a6754d8441bf-Linux-x86_64.tgz\u0026amp;wget=true\u0026#39; Install Splunk on Debian Buster using .deb:\n$ sudo dpkg -i splunk-8.0.3-linux-2.6-amd64.deb Selecting previously unselected package splunk. (Reading database ... 89422 files and directories currently installed.) Preparing to unpack splunk-8.0.3-linux-2.6-amd64.deb ... Unpacking splunk (8.0.3) ... Setting up splunk (8.0.3) ... complete The Splunk install location is /opt/splunk:\n$ ls -l /opt/splunk total 2936 -r--r--r-- 1 splunk splunk 842 Mar 31 02:36 README-splunk.txt drwxr-xr-x 4 splunk splunk 4096 Apr 9 15:02 bin -r--r--r-- 1 splunk splunk 57 Mar 31 02:33 copyright.txt drwxr-xr-x 15 splunk splunk 4096 Apr 9 15:02 etc -rw-r--r-- 1 splunk splunk 426 Apr 9 15:02 ftr drwxr-xr-x 4 splunk splunk 4096 Apr 9 15:02 include drwxr-xr-x 8 splunk splunk 4096 Apr 9 15:02 lib -r--r--r-- 1 splunk splunk 85709 Mar 31 02:33 license-eula.txt drwxr-xr-x 3 splunk splunk 4096 Apr 9 15:02 openssl drwxr-xr-x 4 splunk splunk 4096 Apr 9 15:02 share -r--r--r-- 1 splunk splunk 2881101 Mar 31 02:56 splunk-8.0.3-linux-2.6-x86_64-manifest Start, Stop and Restart Splunk Optional add splunk to PATH:\nexport PATH=\u0026#34;$PATH:/opt/splunk/bin\u0026#34; Start, stop and restart splunk:\n$ splunk start $ splunk stop $ splunk restart Note: Should use splunk user to execute all splunk related command and config change.\n Example:\n$ sudo -u splunk splunk start --accept-license This appears to be your first time running this version of Splunk. Splunk software must create an administrator account during startup. Otherwise, you cannot log in. Create credentials for the administrator account. Characters do not appear on the screen when you type in credentials. Please enter an administrator username: admin Password must contain at least: * 8 total printable ASCII character(s). Please enter a new password: Please confirm new password: Copying \u0026#39;/opt/splunk/etc/openldap/ldap.conf.default\u0026#39; to \u0026#39;/opt/splunk/etc/openldap/ldap.conf\u0026#39;. Generating RSA private key, 2048 bit long modulus .....................................................................................................+++++ ..................................................................................................................................+++++ e is 65537 (0x10001) writing RSA key Generating RSA private key, 2048 bit long modulus ..........+++++ ....................................................+++++ e is 65537 (0x10001) writing RSA key Moving \u0026#39;/opt/splunk/share/splunk/search_mrsparkle/modules.new\u0026#39; to \u0026#39;/opt/splunk/share/splunk/search_mrsparkle/modules\u0026#39;. Splunk\u0026gt; CSI: Logfiles. Checking prerequisites... Checking http port [8000]: open Checking mgmt port [8089]: open Checking appserver port [127.0.0.1:8065]: open Checking kvstore port [8191]: open Checking configuration... Done. Creating: /opt/splunk/var/lib/splunk Creating: /opt/splunk/var/run/splunk Creating: /opt/splunk/var/run/splunk/appserver/i18n Creating: /opt/splunk/var/run/splunk/appserver/modules/static/css Creating: /opt/splunk/var/run/splunk/upload Creating: /opt/splunk/var/run/splunk/search_telemetry Creating: /opt/splunk/var/spool/splunk Creating: /opt/splunk/var/spool/dirmoncache Creating: /opt/splunk/var/lib/splunk/authDb Creating: /opt/splunk/var/lib/splunk/hashDb New certs have been generated in \u0026#39;/opt/splunk/etc/auth\u0026#39;. Checking critical directories...\tDone Checking indexes... Validated: _audit _internal _introspection _metrics _telemetry _thefishbucket history main summary Done Checking filesystem compatibility... Done Checking conf files for problems... Done Checking default conf files for edits... Validating installed files against hashes from \u0026#39;/opt/splunk/splunk-8.0.3-a6754d8441bf-linux-2.6-x86_64-manifest\u0026#39; All installed files intact. Done All preliminary checks passed. Starting splunk server daemon (splunkd)... Generating a RSA private key ..............................................................................................+++++ ..........+++++ writing new private key to \u0026#39;privKeySecure.pem\u0026#39; ----- Signature ok subject=/CN=buster/O=SplunkUser Getting CA Private Key writing RSA key Done Waiting for web server at http://127.0.0.1:8000 to be available........ Done If you get stuck, we\u0026#39;re here to help. Look for answers here: http://docs.splunk.com The Splunk web interface is at http://127.0.0.1:8000 sudo /opt/splunk/bin/splunk enable boot-start -user $ sudo /opt/splunk/bin/splunk enable boot-start -user splunk Init script installed at /etc/init.d/splunk. Init script is configured to run at boot. Splunk ports 8000: For clients to the Splunk Web (webserver) 8089: For Splunk Management port (inter Splunk communication) 9997: For forwarders to the Splunk indexer. (forwarding and receiving data) This need manually enable, see blow Splunk Forwarder. Config Splunk Disable telemetry to splunk If you donot want to send your splunk usage to Splunk Inc. edit /opt/splunk/etc/apps/splunk_instrumentation/local/telemetry.conf to disable telemetry.\n$ sudo -u splunk cat /opt/splunk/etc/apps/splunk_instrumentation/local/telemetry.conf [general] telemetrySalt = ffbebefe-512d-4aa7-b832-634c9b854f6b deploymentID = 7bfc7c72-c062-520a-8a3c-78975cdf5d38 reportStartDate = 2020-04-09 sendAnonymizedUsage = false sendAnonymizedWebAnalytics = false sendLicenseUsage = false optInVersionAcknowledged = 4 sendSupportUsage = false showOptInModal = false see telemetry.conf reference for more configuration.\nAdd local file monitor sudo -u splunk vim /opt/splunk/etc/apps/search/local/inputs.conf\n[monitor:///var/log/nginx/splunk/access.log] disabled = false index = splunk_web sourcetype = access_combined [monitor:///var/log/nginx/splunk/error.log] disabled = false index = splunk_web sourcetype = nginx_error_log [monitor:///var/log/nginx/buster/access.log] disabled = false index = buster_web sourcetype = access_combined [monitor:///var/log/auth.log] disabled = false index = buster_os sourcetype = linux_secure [monitor:///var/log/syslog] disabled = false index = buster_os sourcetype = syslog Splunk Forwarder Enable forwarder receiver on Splunk server Before use splunk forwarder, you need enable receiver on splunk server:\nSettings -\u0026gt; Forwarding and receiving -\u0026gt; Receive data -\u0026gt; Add new Enter port you want (9997 by default). For example, 9997 will receive data on TCP port 9997.\nOr use command line:\n$ sudo -u splunk /opt/splunk/bin/splunk enable listen 9997 Install Forwarder Download forwarder at https://www.splunk.com/en_us/download/universal-forwarder.html Download the current latest version 8.0.3 via Command Line (wget):\n# .rpm format (For Redhat, CentOS) $ wget -O splunkforwarder-8.0.3-a6754d8441bf-linux-2.6-x86_64.rpm \u0026#39;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64\u0026amp;platform=linux\u0026amp;version=8.0.3\u0026amp;product=universalforwarder\u0026amp;filename=splunkforwarder-8.0.3-a6754d8441bf-linux-2.6-x86_64.rpm\u0026amp;wget=true\u0026#39; # .deb format (For Debian, Ubuntu) $ wget -O splunkforwarder-8.0.3-a6754d8441bf-linux-2.6-amd64.deb \u0026#39;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64\u0026amp;platform=linux\u0026amp;version=8.0.3\u0026amp;product=universalforwarder\u0026amp;filename=splunkforwarder-8.0.3-a6754d8441bf-linux-2.6-amd64.deb\u0026amp;wget=true\u0026#39; # .tgz format (For all linux platform) $ wget -O splunkforwarder-8.0.3-a6754d8441bf-Linux-x86_64.tgz \u0026#39;https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64\u0026amp;platform=linux\u0026amp;version=8.0.3\u0026amp;product=universalforwarder\u0026amp;filename=splunkforwarder-8.0.3-a6754d8441bf-Linux-x86_64.tgz\u0026amp;wget=true\u0026#39; Install on CentOS:\n# sudo rpm -ivh splunkforwarder-8.0.3-a6754d8441bf-linux-2.6-x86_64.rpm warning: splunkforwarder-8.0.3-a6754d8441bf-linux-2.6-x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID b3cd4420: NOKEY Preparing... ################################# [100%] Updating / installing... 1:splunkforwarder-8.0.3-a6754d8441b################################# [100%] complete Splunk forwarder install location: /opt/splunkforwarder/\nStart Splunk Forwarder # cd /opt/splunkforwarder/bin # sudo -u splunk ./splunk start --accept-license This appears to be your first time running this version of Splunk. Splunk software must create an administrator account during startup. Otherwise, you cannot log in. Create credentials for the administrator account. Characters do not appear on the screen when you type in credentials. Please enter an administrator username: fadmin Password must contain at least: * 8 total printable ASCII character(s). Please enter a new password: Please confirm new password: Splunk\u0026gt; Finding your faults, just like mom. Checking prerequisites... Checking mgmt port [8089]: open Creating: /opt/splunkforwarder/var/lib/splunk Creating: /opt/splunkforwarder/var/run/splunk Creating: /opt/splunkforwarder/var/run/splunk/appserver/i18n Creating: /opt/splunkforwarder/var/run/splunk/appserver/modules/static/css Creating: /opt/splunkforwarder/var/run/splunk/upload Creating: /opt/splunkforwarder/var/run/splunk/search_telemetry Creating: /opt/splunkforwarder/var/spool/splunk Creating: /opt/splunkforwarder/var/spool/dirmoncache Creating: /opt/splunkforwarder/var/lib/splunk/authDb Creating: /opt/splunkforwarder/var/lib/splunk/hashDb New certs have been generated in \u0026#39;/opt/splunkforwarder/etc/auth\u0026#39;. Checking conf files for problems... Done Checking default conf files for edits... Validating installed files against hashes from \u0026#39;/opt/splunkforwarder/splunkforwarder-8.0.3-a6754d8441bf-linux-2.6-x86_64-manifest\u0026#39; All installed files intact. Done All preliminary checks passed. Starting splunk server daemon (splunkd)... Done [ OK ] Config Forwarder The first step is use splunk add forward-server to add a forwarder server.\n$ ./splunk add forward-server \u0026lt;splunk server\u0026gt;:\u0026lt;receiver port\u0026gt; Example:\n# ./splunk add forward-server 1.2.3.4:9997 Splunk username: fadmin Password: Added forwarding to: 1.2.3.4:9997. Remove forwarder server:\n# ./splunk remove forward-server 1.2.3.4:9997 Stopped forwarding to: 1.2.3.4:9997 Install Splunk forwarder as system service so it can startup at boot time:\n# ./splunk enable boot-start Init script installed at /etc/init.d/splunk. Init script is configured to run at boot. Test Forwarder connection:\n# /opt/splunkforwarder/bin/splunk list forward-server Splunk username: fadmin Password: Active forwards: None Configured but inactive forwards: 1.2.3.4:9997 Add data to monitor\n./splunk add monitor /var/log/auth.log -sourcetype linux_secure ./splunk add monitor /var/log/syslog -sourcetype syslog Note: This is not permanent, need use inputs.conf to make it permanent.\n Forwarder Config File - inputs.conf You can configure data inputs on a forwarder by editing the inputs.conf configuration file.\nIn nearly all cases, edit inputs.conf in the $SPLUNK_HOME/etc/system/local directory. If you have an app installed and want to make changes to its input configuration, edit $SPLUNK_HOME/etc/apps/\u0026lt;appname\u0026gt;/local/inputs.conf. For example, if you have the Splunk Add-on for Unix and Linux installed, you would make edits in $SPLUNK_HOME/etc/apps/Splunk_TA_nix/local/inputs.conf.\nDo not make changes to the inputs.conf in $SPLUNK_HOME/etc/system/default. When you upgrade, the installation overwrites that file, which removes any changes you made.\nWhenever you make a change to a configuration file, you must restart the forwarder for the change to take effect.\nEdit inputs.conf Using your operating system file management tools or a shell or command prompt, navigate to $SPLUNK_HOME/etc/system/local. Open inputs.conf for editing (e.g. /opt/splunkforwarder/etc/system/local/inputs.conf). You might need to create this file if it does not exist. Add your data inputs. Once you have added your inputs, save the file and close it. Restart the forwarder. Example inputs.conf:\n# /opt/splunkforwarder/etc/system/local/inputs.conf # # Linux login log. # For Debian, the log path is /var/log/auth.log # For CentOS, the log path is /var/log/secure [monitor:///var/log/secure] index=foo_os_log sourcetype=linux_secure [monitor:///var/log/syslog] index=foo_os_log sourcetype=syslog Add splunk user to root (CentOS/Redhat) or adm (Debian/Ubuntu) group to have read access to /var/log/secure:\n# usermod -a -G root splunk Install Splunk app Get Splunk app at https://splunkbase.splunk.com/ To mannually install apps and add-ons directly into Splunk Enterprise\n Put the downloaded file in the $SPLUNK_HOME/etc/apps directory. Untar and ungzip your app or add-on, using a tool like tar -xvf (on *nix) or WinZip (on Windows). Restart Splunk. Troubleshooting Enable debug log Change $SPLUNKFORWARDER/etc/log.cfg to enable DEBUG logging, change category.TailingProcessor and category.WatchedFile to DEBUG:\n[splunkd] rootCategory=WARN,A1 # TailingProcessor is meant to be used at level INFO -- without it, analyzing a # normal diag becomes much harder. Do NOT remove the TailingProcessor logger. category.TailingProcessor=DEBUG category.WatchedFile=DEBUG Log file: /opt/splunkforwarder/var/log/splunk/splunkd.log\nForwarder can not connect to Splunk server error:\nWARN TcpOutputProc - Cooked connection to ip=1.2.3.4:9997 timed out Sample success log of forwarder connected to Splunk server error:\nINFO TcpOutputProc - Connected to idx=1.2.3.4:9997, pset=0, reuse=0. INFO TcpOutputProc - Found currently active indexer. Connected to idx=1.2.3.4:9997, reuse=1. Related pages: Troubleshooting Splunk Search Performance by Search Job Inspector Splunk != vs. NOT Difference Detail Explained with Examples Splunk Search Best Practices for Better Performance Response Time References Splunk Forwarder Mannual: Install a Linux universal forwarder https://docs.splunk.com/Documentation/Splunk/8.0.2/Admin/Telemetryconf https://www.splunk.com/en_us/download/universal-forwarder.html Configure data collection on forwarders with inputs.conf inputs.conf ","excerpt":"Install Splunk Download from https://www.splunk.com/en_us/download/splunk-enterprise Download Splunk …","ref":"https://djangocas.dev/blog/install-splunk-and-forwarder/","title":"Install Splunk and Forwarder on Linux"},{"body":"Issues Description In Azure app service, I want to change the keep-alive time period and want to change the HTTP ping (keep-alive) URL to /status, the default is /.\nAnswer from Azure support I can not find proper answer so send request to Azure support.\nThe short answer is there is NO way to change it for now (April, 2020).\nThere is more detail:\n It is not possible to control the default endpoint of keep-alive connection https://docs.microsoft.com/en-us/azure/app-service/configure-common#configure-general-settings .\nAlso there is no way of changing the timeout in a shared app service environment since the request originates from the load balancer, this can only be achieved if the instance is not in a shared environment and using azure load balancer.\nhttps://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-overview https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-tcp-idle-timeout#tcp-idle-timeout You can create a cron job for achieving this by hitting the /status after preferred time and checking if the status is 200. After implementing the custom keep-alive cron job you can always disable the default always on feature in app service. https://docs.microsoft.com/en-us/azure/app-service/faq-availability-performance-application-issues#how-do-i-decrease-the-response-time-for-the-first-request-after-idle-time .\n ","excerpt":"Issues Description In Azure app service, I want to change the keep-alive time period and want to …","ref":"https://djangocas.dev/blog/azure/azure-change-app-service-http-ping-url-and-interval/","title":"Azure Change App Service HTTP Ping URL and Interval"},{"body":"Code organization Go programs are organized into packages.\nA package is a collection of source files in the same directory that are compiled together. Functions, types, variables, and constants defined in one source file are visible to all other source files within the same package.\nA repository contains one or more modules.\nA module is a collection of related Go packages that are released together. A Go repository typically contains only one module, located at the root of the repository. A file named go.mod there declares the module path: the import path prefix for all packages within the module. The module contains the packages in the directory containing its go.mod file as well as subdirectories of that directory, up to the next subdirectory containing another go.mod file (if any).\nNote that you don\u0026rsquo;t need to publish your code to a remote repository before you can build it. A module can be defined locally without belonging to a repository. However, it\u0026rsquo;s a good habit to organize your code as if you will publish it someday.\nEach module\u0026rsquo;s path not only serves as an import path prefix for its packages, but also indicates where the go command should look to download it. For example, in order to download the module golang.org/x/tools, the go command would consult the repository indicated by https://golang.org/x/tools (described more here).\nAn import path is a string used to import a package. A package\u0026rsquo;s import path is its module path joined with its subdirectory within the module. For example, the module github.com/google/go-cmp contains a package in the directory cmp/. That package\u0026rsquo;s import path is github.com/google/go-cmp/cmp. Packages in the standard library do not have a module path prefix.\nYour first program To compile and run a simple program, first choose a module path (we\u0026rsquo;ll use example.com/user/hello) and create a go.mod file that declares it:\n$ mkdir hello # Alternatively, clone it if it already exists in version control. $ cd hello $ go mod init example.com/user/hello go: creating new go.mod: module example.com/user/hello $ cat go.mod module example.com/user/hello go 1.14 The first statement in a Go source file must be package \u0026lt;name\u0026gt;. Executable commands must always use package main.\nNext, create a file named hello.go inside that directory containing the following Go code:\npackage main import \u0026#34;fmt\u0026#34; func main() { fmt.Println(\u0026#34;Hello, world.\u0026#34;) } Now you can build and install that program with the go tool:\n$ go install example.com/user/hello This command builds the hello command, producing an executable binary. It then installs that binary as $HOME/go/bin/hello (or, under Windows, %USERPROFILE%\\go\\bin\\hello.exe).\nThe install directory is controlled by the GOPATH and GOBIN environment variables. If GOBIN is set, binaries are installed to that directory. If GOPATH is set, binaries are installed to the bin subdirectory of the first directory in the GOPATH list. Otherwise, binaries are installed to the bin subdirectory of the default GOPATH ($HOME/go or %USERPROFILE%\\go).\nYou can use the go env command to portably set the default value for an environment variable for future go commands:\n$ go env -w GOBIN=/somewhere/else/bin To unset a variable previously set by go env -w, use go env -u:\n$ go env -u GOBIN Commands like go install apply within the context of the module containing the current working directory. If the working directory is not within the example.com/user/hello module, go install may fail.\nFor convenience, go commands accept paths relative to the working directory, and default to the package in the current working directory if no other path is given. So in our working directory, the following commands are all equivalent:\n$ go install example.com/user/hello $ go install . $ go install Next, let\u0026rsquo;s run the program to ensure it works. For added convenience, we\u0026rsquo;ll add the install directory to our PATH to make running binaries easy:\n# Windows users should consult https://github.com/golang/go/wiki/SettingGOPATH # for setting %PATH%. $ export PATH=$PATH:$(dirname $(go list -f \u0026#39;{{.Target}}\u0026#39; .)) $ hello Hello, world. If you\u0026rsquo;re using a source control system, now would be a good time to initialize a repository, add the files, and commit your first change. Again, this step is optional: you do not need to use source control to write Go code.\n$ git init Initialized empty Git repository in /home/user/hello/.git/ $ git add go.mod hello.go $ git commit -m \u0026#34;initial commit\u0026#34; [master (root-commit) 0b4507d] initial commit 1 file changed, 7 insertion(+) create mode 100644 go.mod hello.go The go command locates the repository containing a given module path by requesting a corresponding HTTPS URL and reading metadata embedded in the HTML response (see go help importpath). Many hosting services already provide that metadata for repositories containing Go code, so the easiest way to make your module available for others to use is usually to make its module path match the URL for the repository.\nImporting packages from your module Let\u0026rsquo;s write a morestrings package and use it from the hello program. First, create a directory for the package named $HOME/hello/morestrings, and then a file named reverse.go in that directory with the following contents:\n// Package morestrings implements additional functions to manipulate UTF-8 // encoded strings, beyond what is provided in the standard \u0026#34;strings\u0026#34; package. package morestrings // ReverseRunes returns its argument string reversed rune-wise left to right. func ReverseRunes(s string) string { r := []rune(s) for i, j := 0, len(r)-1; i \u0026lt; len(r)/2; i, j = i+1, j-1 { r[i], r[j] = r[j], r[i] } return string(r) } Because our ReverseRunes function begins with an upper-case letter, it is exported, and can be used in other packages that import our morestrings package.\nLet\u0026rsquo;s test that the package compiles with go build:\n$ cd $HOME/hello/morestrings $ go build This won\u0026rsquo;t produce an output file. Instead it saves the compiled package in the local build cache.\nAfter confirming that the morestrings package builds, let\u0026rsquo;s use it from the hello program. To do so, modify your original $HOME/hello/hello.go to use the morestrings package:\npackage main import ( \u0026#34;fmt\u0026#34; \u0026#34;example.com/user/hello/morestrings\u0026#34; ) func main() { fmt.Println(morestrings.ReverseRunes(\u0026#34;!oG ,olleH\u0026#34;)) } Install the hello program:\n$ go install example.com/user/hello Running the new version of the program, you should see a new, reversed message: $ hello Hello, Go! Importing packages from remote modules An import path can describe how to obtain the package source code using a revision control system such as Git or Mercurial. The go tool uses this property to automatically fetch packages from remote repositories. For instance, to use github.com/google/go-cmp/cmp in your program:\npackage main import ( \u0026#34;fmt\u0026#34; \u0026#34;example.com/user/hello/morestrings\u0026#34; \u0026#34;github.com/google/go-cmp/cmp\u0026#34; ) func main() { fmt.Println(morestrings.ReverseRunes(\u0026#34;!oG ,olleH\u0026#34;)) fmt.Println(cmp.Diff(\u0026#34;Hello World\u0026#34;, \u0026#34;Hello Go\u0026#34;)) } When you run commands like go install, go build, or go run, the go command will automatically download the remote module and record its version in your go.mod file:\n$ go install example.com/user/hello go: finding module for package github.com/google/go-cmp/cmp go: downloading github.com/google/go-cmp v0.4.0 go: found github.com/google/go-cmp/cmp in github.com/google/go-cmp v0.4.0 $ hello Hello, Go! string( - \u0026#34;Hello World\u0026#34;, + \u0026#34;Hello Go\u0026#34;, ) $ cat go.mod module example.com/user/hello go 1.14 require github.com/google/go-cmp v0.4.0 Module dependencies are automatically downloaded to the pkg/mod subdirectory of the directory indicated by the GOPATH environment variable. The downloaded contents for a given version of a module are shared among all other modules that require that version, so the go command marks those files and directories as read-only. To remove all downloaded modules, you can pass the -modcache flag to go clean:\n$ go clean -modcache Testing Go has a lightweight test framework composed of the go test command and the testing package.\nYou write a test by creating a file with a name ending in _test.go that contains functions named TestXXX with signature func (t *testing.T). The test framework runs each such function; if the function calls a failure function such as t.Error or t.Fail, the test is considered to have failed.\nAdd a test to the morestrings package by creating the file $HOME/hello/morestrings/reverse_test.go containing the following Go code.\npackage morestrings import \u0026#34;testing\u0026#34; func TestReverseRunes(t *testing.T) { cases := []struct { in, want string }{ {\u0026#34;Hello, world\u0026#34;, \u0026#34;dlrow ,olleH\u0026#34;}, {\u0026#34;Hello, 世界\u0026#34;, \u0026#34;界世 ,olleH\u0026#34;}, {\u0026#34;\u0026#34;, \u0026#34;\u0026#34;}, } for _, c := range cases { got := ReverseRunes(c.in) if got != c.want { t.Errorf(\u0026#34;ReverseRunes(%q) == %q, want %q\u0026#34;, c.in, got, c.want) } } } Then run the test with go test:\n$ go test PASS ok example.com/user/morestrings 0.165s Run go help test and see the testing package documentation for more detail.\nReference How to Write Go Code ","excerpt":"Code organization Go programs are organized into packages.\nA package is a collection of source files …","ref":"https://djangocas.dev/blog/organize-go-project/","title":"Organize Go Project"},{"body":"Problem I have redis running in localhost, when I run a docker VM, I want to connect redis from inside of Docker VM, so I do not need docker-compose for another redis VM.\nSolution Docker for Mac: use host.docker.internal For Docker on Mac, there is a magic ip 192.168.65.2 in docker VM which represent host machine, or you can just use host.docker.internal inside docker VM will ok.\n I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST\nThe host has a changing IP address (or none if you have no network access). From 18.03 onwards our recommendation is to connect to the special DNS name host.docker.internal, which resolves to the internal IP address used by the host.\nThis is for development purpose and will not work in a production environment outside of Docker Desktop for Mac.\nThe gateway is also reachable as gateway.docker.internal.\n\u0026ndash; From Docker for Mac host.docker.internal can also pass as env var:\n$ docker run \\ -e REDIS_HOST=host.docker.internal \\ -p 8000:8000 \\ --rm \\ --name foo \\ -it foo container # ping docker.for.mac.localhost PING docker.for.mac.localhost (192.168.65.2): 56 data bytes 64 bytes from 192.168.65.2: seq=0 ttl=37 time=3.075 ms 64 bytes from 192.168.65.2: seq=1 ttl=37 time=0.597 ms Docker for Windows: use host.docker.internal Docker for Windows have similar solution with Docker for Mac, use host.docker.internal.\n I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST\nThe host has a changing IP address (or none if you have no network access). From 18.03 onwards our recommendation is to connect to the special DNS name host.docker.internal, which resolves to the internal IP address used by the host.\nThis is for development purpose and will not work in a production environment outside of Docker Desktop for Windows.\nThe gateway is also reachable as gateway.docker.internal.\n\u0026ndash; From Docker for Windows Docker for Linux To use host.docker.internal on Docker for Linux, need adding --add-host host.docker.internal:host-gateway , for example:\n$ docker run \\ -it \\ --rm \\ --add-host=host.docker.internal:host-gateway \\ alpine \\ cat /etc/hosts References Docker for Mac: Networking: I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST Docker for Windows: Networking: I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST Support host.docker.internal in dockerd on Linux ","excerpt":"Problem I have redis running in localhost, when I run a docker VM, I want to connect redis from …","ref":"https://djangocas.dev/blog/docker-container-to-connect-localhost-of-host/","title":"Docker container to connect localhost of host"},{"body":"Why docker A docker container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.\nA Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.\nComparing Containers and Virtual Machines Containers and virtual machines have similar resource isolation and allocation benefits, but function differently because containers virtualize the operating system instead of hardware. Containers are more portable and efficient.\nInstall docker on Raspberry Pi Docker official add support to install Docker on Raspberry Pi since raspbian/jessie .\nTo install docker on Raspberry Pi in a single shell command:\n$ curl -sSL https://get.docker.com | sh # Executing docker install script, commit: 442e66405c304fa92af8aadaa1d9b31bf4b0ad94 + sudo -E sh -c apt-get update -qq \u0026gt;/dev/null + sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl \u0026gt;/dev/null + sudo -E sh -c curl -fsSL \u0026#34;https://download.docker.com/linux/raspbian/gpg\u0026#34; | apt-key add -qq - \u0026gt;/dev/null Warning: apt-key output should not be parsed (stdout is not a terminal) + sudo -E sh -c echo \u0026#34;deb [arch=armhf] https://download.docker.com/linux/raspbian buster stable\u0026#34; \u0026gt; /etc/apt/sources.list.d/docker.list + sudo -E sh -c apt-get update -qq \u0026gt;/dev/null + [ -n ] + sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce \u0026gt;/dev/null + sudo -E sh -c docker version Client: Docker Engine - Community Version: 19.03.8 API version: 1.40 Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:35:24 2020 OS/Arch: linux/arm Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.8 API version: 1.40 (minimum version 1.12) Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:29:22 2020 OS/Arch: linux/arm Experimental: false containerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683 If you would like to use Docker as a non-root user, you should now consider adding your user to the \u0026#34;docker\u0026#34; group with something like: sudo usermod -aG docker pi Remember that you will have to log out and back in for this to take effect! WARNING: Adding a user to the \u0026#34;docker\u0026#34; group will grant the ability to run containers which can be used to obtain root privileges on the docker host. Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface for more information. Run docker, you need use sudo by default:\n$ sudo docker run -it --rm alpine If you donot use sudo, you will get permission denied error:\n$ docker run -it --rm alpine docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied. See \u0026#39;docker run --help\u0026#39;. To solve this issue, add current user to docker group:\n$ sudo usermod -aG docker pi Logout and re-login pi to let pi use docker without sudo:\n$ docker run -it --rm alpine / # uname -a Linux d551a4afa4e1 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l Linux References Docker comes to Raspberry Pi Add support to install Docker on raspbian/jessie #24815 ","excerpt":"Why docker A docker container is a standard unit of software that packages up code and all its …","ref":"https://djangocas.dev/blog/run-docker-on-raspberry-pi/","title":"Run docker on Raspberry Pi"},{"body":"Rails Logger interface Logger The Ruby Logger class provides a simple but sophisticated logging utility that you can use to output messages.\nLog level Logger level define as Severity .\nclass Logger # Logging severity. # # DEBUG \u0026lt; INFO \u0026lt; WARN \u0026lt; ERROR \u0026lt; FATAL \u0026lt; UNKNOWN # module Severity # Low-level information, mostly for developers. DEBUG = 0 # Generic (useful) information about system operation. INFO = 1 # A warning. WARN = 2 # A handleable error condition. ERROR = 3 # An unhandleable error that results in a program crash. FATAL = 4 # An unknown message that should always be logged. UNKNOWN = 5 end end You can then give the Logger a level, and only messages at that level or higher will be printed.\nFor instance, in a production system, you may have your Logger set to INFO or even WARN. When you are developing the system, however, you probably want to know about the program\u0026rsquo;s internal state, and would set the Logger to DEBUG.\nLogger::LogDevice The best way to add a custom Logger is not extend Logger, instead extend Logger::LogDevice .\nLogger::LogDevice is the device used for logging messages. For example, You can have\n file as LogDevice stdout as LogDevice syslog as LogDevice http API as LogDevice (e.g. Azure application insights) etc. Logger::LogDevice interface:\nclass Logger class LogDevice close() reopen(log = nil) write(message) end end The most important function is write(message) which actually used to log message.\nAzure Application Insight for Ruby Introduction Azure Application Insights SDK for Ruby implements Application Insights API surface to support Ruby.\nApplication Insights is a service that allows developers to keep their application available, performing and succeeding. This Ruby gem will allow you to send telemetry of various kinds (event, trace, exception, etc.) to the Application Insights service where they can be visualized in the Azure Portal.\nRequirements Ruby 1.9.3 and above are currently supported by this gem.\nInstallation $ gem install application_insights Or add following line to Gemfile:\ngem 'application_insights', '~\u0026gt; 0.5.6' Then run:\n$ bundle install Usage Collect logs through track_trace require \u0026#39;application_insights\u0026#39; tc = ApplicationInsights::TelemetryClient.new \u0026#39;\u0026lt;YOUR INSTRUMENTATION KEY GOES HERE\u0026gt;\u0026#39; tc.track_trace \u0026#39;My trace statement\u0026#39;, ApplicationInsights::Channel::Contracts::SeverityLevel::INFORMATION, :properties =\u0026gt; { \u0026#39;custom property\u0026#39; =\u0026gt; \u0026#39;some value\u0026#39; } tc.flush Collecting unhandled exceptions require \u0026#39;application_insights\u0026#39; # setup unhandled exception handler ApplicationInsights::UnhandledException.collect(\u0026#39;\u0026lt;YOUR INSTRUMENTATION KEY GOES HERE\u0026gt;\u0026#39;) # raise an exception and this would be send to Application Insights Service raise Exception, \u0026#39;Oops!\u0026#39; Collecting requests for rack applications In config.ru:\n# set up the TrackRequest middleware in the rackup (config.ru) file require_relative \u0026#39;config/environment\u0026#39; require \u0026#39;application_insights\u0026#39; key = ENV[\u0026#39;APPINSIGHTS_INSTRUMENTATIONKEY\u0026#39;] if key != nil use ApplicationInsights::Rack::TrackRequest, key end run Rails.application In config/environments/production.rb and config/environments/development.rb:\n# For rails, suggest to set up this middleware in application.rb # so that unhandled exceptions from controllers are also collected # buffer size: 8096 key = ENV[\u0026#39;APPINSIGHTS_INSTRUMENTATIONKEY\u0026#39;] if key != nil bufSize = 8096 config.middleware.use ApplicationInsights::Rack::TrackRequest, key, bufSize end Configuring asynchronous channel properties require \u0026#39;application_insights\u0026#39; sender = ApplicationInsights::Channel::AsynchronousSender.new queue = ApplicationInsights::Channel::AsynchronousQueue.new sender channel = ApplicationInsights::Channel::TelemetryChannel.new nil, queue tc = ApplicationInsights::TelemetryClient.new \u0026#39;\u0026lt;YOUR INSTRUMENTATION KEY GOES HERE\u0026gt;\u0026#39;, channel # flush telemetry if we have 10 or more telemetry items in our queue tc.channel.queue.max_queue_length = 10 # send telemetry to the service in batches of 5 tc.channel.sender.send_buffer_size = 5 # the background worker thread will be active for 5 seconds before it shuts down. if # during this time items are picked up from the queue, the timer is reset. tc.channel.sender.send_time = 5 # the background worker thread will poll the queue every 0.5 seconds for new items tc.channel.sender.send_interval = 0.5 Create custom Logger to send logs to Azure application insights Extend Logger::LogDevice Create a helper module to extend Logger::LogDevice and have a method newLogger to create a Logger backend by Azure application insights.\nThe best practice is not hardcode application instrument key in code. Here we read from APPINSIGHTS_INSTRUMENTATIONKEY environment variable. If APPINSIGHTS_INSTRUMENTATIONKEY is not found, do not send log to application insights.\n# # File: application_insights_helper.rb # require \u0026#39;application_insights\u0026#39; module ApplicationInsightsHelper LogMessage = Struct.new(:datetime, :severity, :message) class ApplicationInsightsLogDevice \u0026lt; Logger::LogDevice @tc = nil def initialize() print \u0026#39;AppInsightsLogger.initialize\u0026#39; appInsightKey = ENV[\u0026#39;APPINSIGHTS_INSTRUMENTATIONKEY\u0026#39;] if appInsightKey != nil sender = ApplicationInsights::Channel::AsynchronousSender.new queue = ApplicationInsights::Channel::AsynchronousQueue.new sender channel = ApplicationInsights::Channel::TelemetryChannel.new nil, queue @tc = ApplicationInsights::TelemetryClient.new appInsightKey, channel # flush telemetry if we have 10 or more telemetry items in our queue @tc.channel.queue.max_queue_length = 10 # send telemetry to the service in batches of 5 @tc.channel.sender.send_buffer_size = 5 # the background worker thread will be active for 5 seconds before it shuts down. if # during this time items are picked up from the queue, the timer is reset. @tc.channel.sender.send_time = 5 # the background worker thread will poll the queue every 0.5 seconds for new items @tc.channel.sender.send_interval = 0.5 end end def write(message) return if @tc == nil level = nil if message.severity == \u0026#39;FATAL\u0026#39; level = ApplicationInsights::Channel::Contracts::SeverityLevel::CRITICAL elsif message.severity == \u0026#39;ERROR\u0026#39; level = ApplicationInsights::Channel::Contracts::SeverityLevel::ERROR elsif message.severity == \u0026#39;WARN\u0026#39; level = ApplicationInsights::Channel::Contracts::SeverityLevel::WARNING elsif message.severity == \u0026#39;INFO\u0026#39; level = ApplicationInsights::Channel::Contracts::SeverityLevel::INFORMATION end # only send info and above log to app insights to reduce log size. return if level == nil @tc.track_trace \u0026#34;#{Process.pid}#{message.message}\u0026#34;, level @tc.flush end def reopen() # Nothing to do here. self end def close() # Nothing to do here. end def formatter() proc do |severity, datetime, progname, msg| message = LogMessage.new message.datetime = datetime message.severity = severity message.message = msg message end end end def self.newApplicationInsightsLogger() logDevice = ApplicationInsightsLogDevice.new logger = Logger.new(logDevice) if logDevice.respond_to?(:formatter) logger.formatter = logDevice.formatter end logger end end Usage In config/environments/production.rb, use Logger\u0026rsquo;s extend() method to add a new logger.\nrequire_relative \u0026#39;path/to/app_insights_helper\u0026#39; Rails.application.configure do ... ... logger = AppInsightsHelper::newApplicationInsightsLogger config.logger.extend(ActiveSupport::Logger.broadcast(logger)) ... ... That\u0026rsquo;s it. Now log will send to Azure application insights.\nNote In Azure application insights console, you need got to Investigate -\u0026gt; Search to view logs. References https://ruby-doc.org/stdlib-2.6.5/libdoc/logger/rdoc/Logger.html https://ruby-doc.org/stdlib-2.6.5/libdoc/logger/rdoc/Logger/LogDevice.html https://github.com/ruby/logger https://github.com/ruby/logger/blob/master/lib/logger.rb https://github.com/ruby/logger/blob/master/lib/logger/log_device.rb https://github.com/microsoft/ApplicationInsights-Ruby ","excerpt":"Rails Logger interface Logger The Ruby Logger class provides a simple but sophisticated logging …","ref":"https://djangocas.dev/blog/custom-rails-logger-to-use-azure-application-insights/","title":"Custom Rails Logger to Use Azure Application Insights"},{"body":"What is Secure DNS Traditionally, DNS queries are sent in plaintext. Anyone listening on the Internet can see which websites you are connecting to.\nTo ensure your DNS queries remain private, you should use a resolver that supports secure DNS transport such as DNS over HTTPS (DoH) or DNS over TLS (DoT).\nDoH providers Cloudflare Google Cleanbrowsing Comcast DNS.SB OpenDNS Quad9 Problem A lot of home routers do not support DoH by default, you can change router\u0026rsquo;s DNS setting to point different DNS server but can not use secure DNS directly.\nTo solve this problem, one way is run a local DNS agent to proxy all the DNS queries through DoH or DoT.\nThe agent listen on DNS port 53 to receive incoming DNS query, here the query can come from router.\nI use a Raspberrypi to host DoH client agent. Cloudflare provide a DoH client agent cloudflared.\nInstall cloudflared Download cloudflared Download the latest version of cloudflared:\n$ wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz --2020-03-06 16:44:52-- https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz Resolving bin.equinox.io (bin.equinox.io)... 34.235.56.240, 34.201.246.51, 34.192.78.186, ... Connecting to bin.equinox.io (bin.equinox.io)|34.235.56.240|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 17677329 (17M) [application/octet-stream] Saving to: ‘cloudflared-stable-linux-arm.tgz’ cloudflared-stable-linux-arm. 100%[=================================================\u0026gt;] 16.86M 5.03MB/s in 4.1s 2020-03-06 16:44:58 (4.10 MB/s) - ‘cloudflared-stable-linux-arm.tgz’ saved [17677329/17677329] unzip, it only include one binary file cloudflare:\n$ tar zxvf cloudflared-stable-linux-arm.tgz cloudflared Note Should not use .deb package provide by Cloudflare for Raspberrypi, it will failed to install:\n$ sudo apt install ./cloudflared-stable-linux-arm.deb Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting \u0026#39;cloudflared:arm\u0026#39; instead of \u0026#39;./cloudflared-stable-linux-arm.deb\u0026#39; The following NEW packages will be installed: cloudflared:arm 0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded. Need to get 0 B/17.3 MB of archives. After this operation, 37.0 MB of additional disk space will be used. Get:1 cloudflared-stable-linux-arm.deb cloudflared arm 2020.2.1 [17.3 MB] dpkg: error processing archive cloudflared-stable-linux-arm.deb (--unpack): package architecture (arm) does not match system (armhf) Errors were encountered while processing: cloudflared-stable-linux-arm.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Check cloudflared version:\n$ ./cloudflared --version cloudflared version 2020.2.1 (built 2020-02-27-1710 UTC) Config cloudflared Create a config file name /usr/local/etc/cloudflared/config.yml, the content as following:\nlogfile:/var/log/cloudflared.logproxy-dns:trueproxy-dns-address:0.0.0.0proxy-dns-port:53proxy-dns-upstream:- https://1.1.1.1/dns-query- https://1.0.0.1/dns-query Note Use proxy-dns-address: 0.0.0.0 to allow DoH client agent receive incoming DNS query. The default is 127.0.0.1 which only receive DNS query from localhost. Install as a service Install as a service to allow startup after reboot:\n$ sudo ./cloudflared service install INFO[0000] Failed to copy user configuration. Before running the service, ensure that /etc/cloudflared contains two files, cert.pem and config.yml error=\u0026#34;open /usr/local/etc/cloudflared/cert.pem: no such file or directory\u0026#34; Note: error=open /usr/local/etc/cloudflared/cert.pem: no such file or directory You may see this error during install as service.\nTo solve this issue, copy /etc/cloudflared/cert.pem to /usr/local/etc/cloudflared/cert.pem:\n$ sudo cp /etc/cloudflared/cert.pem /usr/local/etc/cloudflared/cert.pem Then re-run install:\n$ sudo ./cloudflared service install INFO[0000] Copied /usr/local/etc/cloudflared/config.yml to /etc/cloudflared/config.yml INFO[0000] Using Systemd ERRO[0001] systemctl: Created symlink /etc/systemd/system/multi-user.target.wants/cloudflared.service → /etc/systemd/system/cloudflared.service. INFO[0001] systemctl daemon-reload Note: Configuration file /etc/cloudflared/config.yml must contain entries for the tunnel to run and its associated credentials You may see this error with newer version of cloudflared (e.g. 2020.12.0)\nConfiguration file /etc/cloudflared/config.yml must contain entries for the tunnel to run and its associated credentials: tunnel: TUNNEL-UUID credentials-file: CREDENTIALS-FILE To solve this issue, workaround with --legacy:\nsudo ./cloudflared service install --legacy After service installed, the config file copied to /etc/cloudflared/config.yml. Future change config should change /etc/cloudflared/config.yml directly.\nEnable cloudflared service $ sudo systemctl enable cloudflared $ sudo systemctl start cloudflared $ systemctl status cloudflared ● cloudflared.service - Argo Tunnel Loaded: loaded (/etc/systemd/system/cloudflared.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-03-06 17:42:52 UTC; 4h 51min ago Main PID: 5735 (cloudflared) Tasks: 14 (limit: 1772) Memory: 12.3M CGroup: /system.slice/cloudflared.service └─5735 /home/pi/sbin/cloudflared --config /etc/cloudflared/config.yml --origincert /etc/cloudflared/cert.pem --no-autoupdate Mar 06 17:42:52 pi3 systemd[1]: Starting Argo Tunnel... Mar 06 17:42:52 pi3 cloudflared[5735]: time=\u0026#34;2020-03-06T17:42:52Z\u0026#34; level=info msg=\u0026#34;Version 2020.2.1\u0026#34; Mar 06 17:42:52 pi3 cloudflared[5735]: time=\u0026#34;2020-03-06T17:42:52Z\u0026#34; level=info msg=\u0026#34;GOOS: linux, GOVersion: go1.12.7, GoArch: arm\u0026#34; Mar 06 17:42:52 pi3 cloudflared[5735]: time=\u0026#34;2020-03-06T17:42:52Z\u0026#34; level=info msg=Flags config=/etc/cloudflared/config.yml logfile=/var/log/cloudflared.log no-autoupdate=true origincert=/etc/cloudflared/cert.pem proxy-dns=true proxy Mar 06 17:42:52 pi3 cloudflared[5735]: time=\u0026#34;2020-03-06T17:42:52Z\u0026#34; level=info msg=\u0026#34;Adding DNS upstream\u0026#34; url=\u0026#34;https://1.1.1.1/dns-query\u0026#34; Mar 06 17:42:52 pi3 cloudflared[5735]: time=\u0026#34;2020-03-06T17:42:52Z\u0026#34; level=info msg=\u0026#34;Adding DNS upstream\u0026#34; url=\u0026#34;https://1.0.0.1/dns-query\u0026#34; Mar 06 17:42:52 pi3 cloudflared[5735]: time=\u0026#34;2020-03-06T17:42:52Z\u0026#34; level=info msg=\u0026#34;Starting DNS over HTTPS proxy server\u0026#34; addr=\u0026#34;dns://0.0.0.0:53\u0026#34; Mar 06 17:42:52 pi3 cloudflared[5735]: time=\u0026#34;2020-03-06T17:42:52Z\u0026#34; level=info msg=\u0026#34;Starting metrics server\u0026#34; addr=\u0026#34;127.0.0.1:32417\u0026#34; Test cloudflared Use dig to query DNS through cloudflared, you should get success DNS response:\n$ dig +short @127.0.0.1 google.com AAAA 2607:f8b0:4007:800::200e $ dig +short @127.0.0.1 google.com A 216.58.217.206 Set up router Once DoH client agent set successfully, then change router\u0026rsquo;s setting, let it DNS server point to Raspberrypi. That\u0026rsquo;s it.\nYou can test it through Cloudflare test page.\nSetup browser to use DoH If DoH is setup properly on router, there is no need setup browser, otherwise you can also setup browser to use DoH explicitly.\nChrome Chrome 78 start support DoH, you can enable it through chrome://flags/#dns-over-https:\n Secure DNS lookups\nEnables DNS over HTTPS. When this feature is enabled, your browser may try to use a secure HTTPS connection to look up the addresses of websites and other web resources. – Mac, Windows, Chrome OS, Android\n#dns-over-https\n Firefox In about:config, search network.trr.mode and set it value to 2.\n network.trr.mode\nThe resolver mode. You should not change the mode manually, instead use the UI in the Network Settings section of about:preferences\n 0 - Off (default). use standard native resolving only (don\u0026rsquo;t use TRR at all) 1 - Reserved (used to be Race mode) 2 - First. Use TRR first, and only if the name resolve fails use the native resolver as a fallback. 3 - Only. Only use TRR, never use the native resolver. Up to FF \u0026gt;= 73, this mode also requires the bootstrapAddress pref to be set. Starting with Firefox 74, setting the bootstrap address is no longer mandatory - the browser will simply bootstrap itself using regular DNS, unless the DoH server domain can\u0026rsquo;t be resolved. The native resolver will still be used for portal detection and telemetry (Bug 1593873) 4 - Reserved (used to be Shadow mode) 5 - Off by choice. This is the same as 0 but marks it as done by choice and not done by default. see https://wiki.mozilla.org/Trusted_Recursive_Resolver#network.trr.mode Appendix cloudflared command line help $ cloudflared --help NAME: cloudflared - Cloudflare\u0026#39;s command-line tool and agent USAGE: cloudflared [global options] command [command options] origin-url VERSION: 2020.2.1 (built 2020-02-27-1710 UTC) DESCRIPTION: cloudflared connects your machine or user identity to Cloudflare\u0026#39;s global network. You can use it to authenticate a session to reach an API behind Access, route web traffic to this machine, and configure access control. COMMANDS: update Update the agent if a new version exists version Print the version proxy-dns Run a DNS over HTTPS proxy server. service Manages the Argo Tunnel system service help, h Shows a list of commands or help for one command Access (BETA): access access \u0026lt;subcommand\u0026gt; Tunnel: tunnel Make a locally-running web service accessible over the internet using Argo Tunnel. GLOBAL OPTIONS: --help, -h show help (default: false) --version, -v, -V Print the version (default: false) COPYRIGHT: (c) 2020 Cloudflare Inc. Your installation of cloudflared software constitutes a symbol of your signature indicating that you accept the terms of the Cloudflare License (https://developers.cloudflare.com/argo-tunnel/license/), Terms (https://www.cloudflare.com/terms/) and Privacy Policy (https://www.cloudflare.com/privacypolicy/). cloudflared command line help for proxy-dns $ cloudflared proxy-dns --help NAME: cloudflared proxy-dns - Run a DNS over HTTPS proxy server. USAGE: cloudflared proxy-dns [command options] OPTIONS: --metrics value Listen address for metrics reporting. (default: \u0026#34;localhost:\u0026#34;) [$TUNNEL_METRICS] --address value Listen address for the DNS over HTTPS proxy server. (default: \u0026#34;localhost\u0026#34;) [$TUNNEL_DNS_ADDRESS] --port value Listen on given port for the DNS over HTTPS proxy server. (default: 53) [$TUNNEL_DNS_PORT] --upstream value Upstream endpoint URL, you can specify multiple endpoints for redundancy. (default: \u0026#34;https://1.1.1.1/dns-query\u0026#34;, \u0026#34;https://1.0.0.1/dns-query\u0026#34;) [$TUNNEL_DNS_UPSTREAM] --help, -h show help (default: false) Related pages: Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security OpenSSL CSR Examples: Self Signed Certificate and How to Start Test TLS/SSL Server/Client testssl.sh examples command line tool check server TLS/SSL (weak) ciphers and detect TLS/SSL vulnerabilities ECDSA signature verify in kotlin and Golang Test TLS Connection Ciphers TLS Version and Certificate with OpenSSL Command Line Secure Squid Proxy Server References https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/ https://developers.cloudflare.com/argo-tunnel/downloads/ https://www.chromium.org/developers/dns-over-https https://wiki.mozilla.org/Trusted_Recursive_Resolver ","excerpt":"What is Secure DNS Traditionally, DNS queries are sent in plaintext. Anyone listening on the …","ref":"https://djangocas.dev/blog/running-a-dns-over-https-doh-client-to-encrypt-all-home-dns-traffic/","title":"Running a DNS over HTTPS Client to encrypt all home DNS traffic"},{"body":"Keeping index statistics up to date Performance has been steadily deteriorating as you use your Postgres system.\nSolution Use the VACUUM ANALYZE command in psql or the vacuumdb command-line tool.\nvacuumdb is garbage-collect and analyze a PostgreSQL database.\nDiscussion When you delete records from Postgres it doesn\u0026rsquo;t reclaim the space, it just marks them deleted and gets on with other business. From psql you can issue a VACUUM command to reclaim space from a table.\nIts second function is to update index statistics. Your indexes will always be accurate without this, but Postgres uses the statistics to know when and where to use an index rather than scanning the table.\nIf you want to see what is happening you can add the VERBOSE qualifier.\n=#VACUUMANALYZEinventory;VACUUM=#VACUUMVERBOSEANALYZEinventory;INFO:vacuuming\u0026#34;public.inventory\u0026#34;INFO:index\u0026#34;inventory_pkey\u0026#34;nowcontains4581rowversionsin15pagesDETAIL:0indexrowversionswereremoved.0indexpageshavebeendeleted,0arecurrentlyreusable.CPU0.00s/0.00usecelapsed0.00sec.INFO:index\u0026#34;idx_store_id_film_id\u0026#34;nowcontains4581rowversionsin15pagesDETAIL:0indexrowversionswereremoved.0indexpageshavebeendeleted,0arecurrentlyreusable.CPU0.00s/0.00usecelapsed0.00sec.INFO:\u0026#34;inventory\u0026#34;:found0removable,4581nonremovablerowversionsin25outof25pagesDETAIL:0deadrowversionscannotberemovedyet.Therewere0unuseditempointers.0pagesareentirelyempty.CPU0.00s/0.00usecelapsed0.01sec.INFO:analyzing\u0026#34;public.inventory\u0026#34;INFO:\u0026#34;inventory\u0026#34;:scanned25of25pages,containing4581liverowsand0deadrows;4581rowsinsample,4581estimatedtotalrowsVACUUMNote - those of us who speak the Queen\u0026rsquo;s English can use ANALYSE instead in recent versions of Postgres.\n[NOTE - blocks updates but not reads - check this]\nThe vacuumdb command works similarly, but can process a whole database in one go.\nvacuumdb --full \u0026lt;dbname\u0026gt; # Perform \u0026#34;full\u0026#34; vacuuming. Analyzing a query-plan A query is running much slower than you expected. You suspect an index is being ignored or you are missing an index on a particular column.\nSolution Use EXPLAIN \u0026lt;query\u0026gt;.\nDiscussion The EXPLAIN command displays the query plan that Postgres uses. It shows the decisions it makes and the costs it calculated that led to those decisions.\n=#EXPLAINSELECTco_name,dy_type,dy_notesFROMcompaniesJOINdiaryONco_id=dy_company;NOTICE:QUERYPLAN:NestedLoop(cost=0.00..25.81rows=30width=44)-\u0026gt;SeqScanondiary(cost=0.00..1.03rows=3width=28)-\u0026gt;IndexScanusingcompanies_co_id_keyoncompanies(cost=0.00..8.14rows=10width=16)EXPLAINThe costs given are relative to each other - no absolute meaning. The rows are an estimate on the number of rows being returned and the width represents the amount of data involved per record. In the (trivial) example above, Postgres performs a sequential scan of the diary table and then uses the index on companies.co_id to perform the join.\nComplex queries produce complex query plans - pay careful attention to the rows part. If Postgres thinks it will fetch 1000 rows from a 1500 row table then it will ignore the index and use a Seq Scan instead. If it estimates the rows wrong it will make the wrong decision.\nForcing use of an index You have all the relevant indexes and you know it would be faster if Postgres used them but EXPLAIN is showing that Postgres is getting its cost calculations wrong.\nSolution Issue SET SEQSCAN TO OFF before the query to force all indexes to be used.\nDiscussion Before forcing Postgres to use indexes, make sure you have run VACUUM ANALYZE recently and that the EXPLAIN shows unexpected cost calculations. It\u0026rsquo;s important to make sure Postgres is using accurate information before overriding its decisions.\nIf that still doesn\u0026rsquo;t help, you can tell Postgres to always use an index if one is available. If you have a complex query with a mix of sequence scans and index searches this may actually make things worse.\nSETSEQSCANTOOFFSELECT...SETSEQSCANTOONCheck the runtime-configuration page for other settings you can change. You alter the various cost weightings at your own risk.\nSetting logging You can do this on the command-line to postmaster or set it in postgresql.conf in the data directory (examples below)\n# This is a comment log_connections = yes syslog = 2 You can log to syslog, stdout etc. See DEBUG_LEVEL etc for more info. You will need to consult the manual page for your syslogger to find out how to configure that end of things.\nDebugging a complex query/function You are trying to build a complex query/plpgsql function and keep getting parse errors referring to an error near ' or similar.\nSolution Build your query/function in a text editor and execute using\n$ psql -f (file) (database) This gives you line numbers with the error message, and lets you run through the test/debug cycle quickly.\nTweaking for performance You have your database design worked out but testing reveals performance problems - what hardware do you upgrade first?\nSolution No one answer for this - it depends on where the bottleneck is.\nDiscussion Before you start spending money on hardware, make sure your database design is solid and you know where the bottlenecks are.\nSome key points are (in no particular order):\n Turn off flushing after each write (NOTE - see WAL docs once available)\n Check shared-memory settings .\n Check max no. of clients (and up shared-mem accordingly)\n Amount of RAM / speed of disks (enough RAM for whole DB if poss :-)\n Processor speed and number (only one process per query though, so only useful for multiple clients)\n Use replication if you feel it suits your needs (see the contrib/ directory of the source distribution)\n Again - make sure you understand what the problem is before leaping into upgrades.\nReference PostgreSQL SQL Explain PostgreSQL SQL Set PostgreSQL Server Config PostgreSQL psql PostgreSQL Managing Kernel Resources ","excerpt":"Keeping index statistics up to date Performance has been steadily deteriorating as you use your …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-performance-tuning-debugging-and-testing/","title":"PostgreSQL mini cookbook: Performance Tuning, Debugging and Testing"},{"body":"Seeing what tables exist You want to check if a table already exists.\nSolution There is a view called pg_tables or the system table pg_class - you can query either. There is less information in pg_tables but it is easier to understand.\nList all the tables, similar to \\dt:\nSELECT*FROMpg_tablesWHEREschemaname!=\u0026#39;pg_catalog\u0026#39;ANDschemaname!=\u0026#39;information_schema\u0026#39;;SELECT*FROMpg_tablesWHEREtablenameLIKE\u0026#39;foo%\u0026#39;;SELECT*FROMpg_classWHERErelnameLIKE\u0026#39;foo%\u0026#39;;Example: view all user defined tables:\n=#SELECT*FROMpg_tablesWHEREschemaname!=\u0026#39;pg_catalog\u0026#39;ANDschemaname!=\u0026#39;information_schema\u0026#39;;schemaname|tablename|tableowner|tablespace|hasindexes|hasrules|hastriggers------------+---------------+------------+------------+------------+----------+------------- public|film_category|foo||t|f|tpublic|staff|foo||t|f|tpublic|country|foo||t|f|tpublic|inventory|foo||t|f|tpublic|rental|foo||t|f|tpublic|store|foo||t|f|tpublic|city|foo||t|f|tpublic|actor|foo||t|f|tpublic|payment|foo||t|f|tpublic|address|foo||t|f|tpublic|language|foo||t|f|tpublic|film_actor|foo||t|f|tpublic|category|foo||t|f|tpublic|film|foo||t|f|tpublic|customer|foo||t|f|t(15rows)Example: view all pg_catalog tables:\n=#SELECT*FROMpg_tables-#WHEREschemaname=\u0026#39;pg_catalog\u0026#39;;schemaname|tablename|tableowner|tablespace|hasindexes|hasrules|hastriggers------------+-------------------------+------------+------------+------------+----------+------------- pg_catalog|pg_statistic|foo||t|f|fpg_catalog|pg_type|foo||t|f|fpg_catalog|pg_authid|foo|pg_global|t|f|fpg_catalog|pg_attribute|foo||t|f|fpg_catalog|pg_proc|foo||t|f|fpg_catalog|pg_user_mapping|foo||t|f|fpg_catalog|pg_attrdef|foo||t|f|fpg_catalog|pg_constraint|foo||t|f|fpg_catalog|pg_index|foo||t|f|fpg_catalog|pg_operator|foo||t|f|fpg_catalog|pg_opfamily|foo||t|f|fpg_catalog|pg_opclass|foo||t|f|fpg_catalog|pg_am|foo||t|f|fpg_catalog|pg_amop|foo||t|f|fpg_catalog|pg_amproc|foo||t|f|fpg_catalog|pg_largeobject_metadata|foo||t|f|fpg_catalog|pg_aggregate|foo||t|f|fpg_catalog|pg_rewrite|foo||t|f|fpg_catalog|pg_trigger|foo||t|f|fpg_catalog|pg_event_trigger|foo||t|f|fpg_catalog|pg_description|foo||t|f|fpg_catalog|pg_cast|foo||t|f|fpg_catalog|pg_enum|foo||t|f|fpg_catalog|pg_namespace|foo||t|f|fpg_catalog|pg_conversion|foo||t|f|fpg_catalog|pg_depend|foo||t|f|fpg_catalog|pg_database|foo|pg_global|t|f|fpg_catalog|pg_db_role_setting|foo|pg_global|t|f|fpg_catalog|pg_tablespace|foo|pg_global|t|f|fpg_catalog|pg_pltemplate|foo|pg_global|t|f|fpg_catalog|pg_auth_members|foo|pg_global|t|f|fpg_catalog|pg_shdepend|foo|pg_global|t|f|fpg_catalog|pg_shdescription|foo|pg_global|t|f|fpg_catalog|pg_ts_config|foo||t|f|fpg_catalog|pg_ts_config_map|foo||t|f|fpg_catalog|pg_ts_dict|foo||t|f|fpg_catalog|pg_ts_parser|foo||t|f|fpg_catalog|pg_ts_template|foo||t|f|fpg_catalog|pg_extension|foo||t|f|fpg_catalog|pg_foreign_data_wrapper|foo||t|f|fpg_catalog|pg_foreign_server|foo||t|f|fpg_catalog|pg_foreign_table|foo||t|f|fpg_catalog|pg_default_acl|foo||t|f|fpg_catalog|pg_seclabel|foo||t|f|fpg_catalog|pg_shseclabel|foo|pg_global|t|f|fpg_catalog|pg_collation|foo||t|f|fpg_catalog|pg_range|foo||t|f|fpg_catalog|pg_largeobject|foo||t|f|fpg_catalog|pg_class|foo||t|f|fpg_catalog|pg_inherits|foo||t|f|fpg_catalog|pg_language|foo||t|f|f(51rows)Example: view all information_schema tables:\n=#SELECT*FROMpg_tables-#WHEREschemaname=\u0026#39;information_schema\u0026#39;;schemaname|tablename|tableowner|tablespace|hasindexes|hasrules|hastriggers--------------------+-------------------------+------------+------------+------------+----------+------------- information_schema|sql_implementation_info|foo||f|f|finformation_schema|sql_languages|foo||f|f|finformation_schema|sql_packages|foo||f|f|finformation_schema|sql_sizing|foo||f|f|finformation_schema|sql_sizing_profiles|foo||f|f|finformation_schema|sql_features|foo||f|f|finformation_schema|sql_parts|foo||f|f|f(7rows)Viewing triggers and their functions You want a list of triggers and the functions they call on certain tables.\nSolution To see the triggers and functions on tables foo_xxx use:\nSELECTcl.relname,tr.tgnameAStriggername,tr.tgenabled,fn.pronameASfunc_nameFROMpg_triggerAStr,pg_classAScl,pg_procASfnWHEREtr.tgrelid=cl.oidANDtr.tgfoid=fn.oidANDcl.relname˜\u0026#39;^foo%\u0026#39;;Example:\n=#SELECTcl.relname,-#tr.tgnameAStriggername,-#tr.tgenabled,-#fn.pronameASfunc_name-#FROMpg_triggerAStr,-#pg_classAScl,-#pg_procASfn-#WHEREtr.tgrelid=cl.oid-#ANDtr.tgfoid=fn.oid;relname|triggername|tgenabled|func_name---------------+------------------------------+-----------+------------------------- film|film_fulltext_trigger|O|tsvector_update_triggeraddress|last_updated|O|last_updatedstore|last_updated|O|last_updatedaddress|RI_ConstraintTrigger_a_72626|O|RI_FKey_restrict_deladdress|RI_ConstraintTrigger_a_72627|O|RI_FKey_cascade_updcustomer|RI_ConstraintTrigger_c_72628|O|RI_FKey_check_ins...Viewing function bodies You want to see function definition: the source for a previously defined function.\nSolution You can use either of the following:\n\\df+myfuncor\nSELECToid,proname,prosrcFROMpg_procWHEREproname=\u0026#39;myfunc\u0026#39;;Example:\n=#\\dfListoffunctionsSchema|Name|Resultdatatype|Argumentdatatypes|Type--------+----------------------------+------------------+---------------------------------------------------------------------+--------- public|_group_concat|text|text,text|normalpublic|film_in_stock|SETOFinteger|p_film_idinteger,p_store_idinteger,OUTp_film_countinteger|normalpublic|film_not_in_stock|SETOFinteger|p_film_idinteger,p_store_idinteger,OUTp_film_countinteger|normalpublic|get_customer_balance|numeric|p_customer_idinteger,p_effective_datetimestampwithouttimezone|normalpublic|group_concat|text|text|aggpublic|inventory_held_by_customer|integer|p_inventory_idinteger|normalpublic|inventory_in_stock|boolean|p_inventory_idinteger|normalpublic|last_day|date|timestampwithouttimezone|normalpublic|last_updated|trigger||triggerpublic|rewards_report|SETOFcustomer|min_monthly_purchasesinteger,min_dollar_amount_purchasednumeric|normal(10rows)=#\\dffilm_in_stockListoffunctionsSchema|Name|Resultdatatype|Argumentdatatypes|Type--------+---------------+------------------+-----------------------------------------------------------------+-------- public|film_in_stock|SETOFinteger|p_film_idinteger,p_store_idinteger,OUTp_film_countinteger|normal(1row)=#\\df+film_in_stockListoffunctionsSchema|Name|Resultdatatype|Argumentdatatypes|Type|Security|Volatility|Owner|Language|Sourcecode|Description--------+---------------+------------------+-----------------------------------------------------------------+--------+----------+------------+-------+----------+--------------------------------------------+------------- public|film_in_stock|SETOFinteger|p_film_idinteger,p_store_idinteger,OUTp_film_countinteger|normal|invoker|volatile|ming|sql|+||||||||||SELECTinventory_id+||||||||||FROMinventory+||||||||||WHEREfilm_id=$1+||||||||||ANDstore_id=$2+||||||||||ANDinventory_in_stock(inventory_id);+|||||||||||(1row)Example: Use pg_proc table to view function definition:\n=#SELECToid,proname,prosrc-=FROMpg_proc-=WHEREproname=\u0026#39;film_in_stock\u0026#39;;oid|proname|prosrc-------+---------------+-------------------------------------------- 72408|film_in_stock|+||SELECTinventory_id+||FROMinventory+||WHEREfilm_id=$1+||ANDstore_id=$2+||ANDinventory_in_stock(inventory_id);+||(1row)Viewing rules You want to see what rules you have defined for a particular view/table.\nSolution Use the pg_rules system table.\nSELECT*FROMpg_rulesWHEREtablename=\u0026#39;foo\u0026#39;;Example:\n=#SELECT*FROMpg_rules;schemaname|tablename|rulename|definition------------+-------------+---------------+-------------------------------------------------------------- pg_catalog|pg_settings|pg_settings_n|CREATERULEpg_settings_nAS|||ONUPDATETOpg_catalog.pg_settingsDOINSTEADNOTHING;pg_catalog|pg_settings|pg_settings_u|CREATERULEpg_settings_uAS|||ONUPDATETOpg_catalog.pg_settings|||WHERE(new.name=old.name)|||DOSELECTset_config(old.name,new.setting,false)|||ASset_config;Viewing indexes You want to see what indexes you have defined for a particular view/table.\nSolution Use the pg_indexes system table.\nThe view pg_indexes provides access to useful information about each index in the database.\npg_indexes Columns:\n Name Type References Description schemaname name pg_namespace.nspname Name of schema containing table and index tablename name pg_class.relname Name of table the index is for indexname name pg_class.relname Name of index tablespace name pg_tablespace.spcname Name of tablespace containing index (null if default for database) indexdef text Index definition (a reconstructed CREATE INDEX command) Example: List all the indexes and its definition:\n=#SELECTtablename,-#indexname,-#indexdefASdefinition-#FROMpg_indexes-#WHERE-#schemaname=\u0026#39;public\u0026#39;-#ORDERBY-#tablename,-#indexname;tablename|indexname|definition-------------+---------------------+--------------------------------------------------------------------------------------------------- actor|actor_pkey|CREATEUNIQUEINDEXactor_pkeyONpublic.actorUSINGbtree(actor_id)actor|idx_actor_last_name|CREATEINDEXidx_actor_last_nameONpublic.actorUSINGbtree(last_name)address|address_pkey|CREATEUNIQUEINDEXaddress_pkeyONpublic.addressUSINGbtree(address_id)address|idx_fk_city_id|CREATEINDEXidx_fk_city_idONpublic.addressUSINGbtree(city_id)category|category_pkey|CREATEUNIQUEINDEXcategory_pkeyONpublic.categoryUSINGbtree(category_id)city|city_pkey|CREATEUNIQUEINDEXcity_pkeyONpublic.citUSINGbtree(city_id)You can also use \\d \u0026lt;tablename\u0026gt;:\n=#\\dactorTable\u0026#34;public.actor\u0026#34;Column|Type|Modifiers-------------+-----------------------------+---------------------------------------------------------- actor_id|integer|notnulldefaultnextval(\u0026#39;actor_actor_id_seq\u0026#39;::regclass)first_name|charactervarying(45)|notnulllast_name|charactervarying(45)|notnulllast_update|timestampwithouttimezone|notnulldefaultnow()Indexes:\u0026#34;actor_pkey\u0026#34;PRIMARYKEY,btree(actor_id)\u0026#34;idx_actor_last_name\u0026#34;btree(last_name)Referencedby:TABLE\u0026#34;film_actor\u0026#34;CONSTRAINT\u0026#34;film_actor_actor_id_fkey\u0026#34;FOREIGNKEY(actor_id)REFERENCESactor(actor_id)ONUPDATECASCADEONDELETERESTRICTTriggers:last_updatedBEFOREUPDATEONactorFOREACHROWEXECUTEPROCEDURElast_updated()References PostgreSQL System Catalogs ","excerpt":"Seeing what tables exist You want to check if a table already exists.\nSolution There is a view …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-dealing-with-the-system-tables/","title":"PostgreSQL mini cookbook: Dealing with the system tables"},{"body":"Making sure a related record exists Records in one table should all be connected to records in another table - you shouldn\u0026rsquo;t have diary entries for a company that isn\u0026rsquo;t listed in the companies table.\nSolution Define a FOREIGN KEY on the diary table that REFERENCES the primary key in companies.\nOr use ALTER TABLE ... ADD CONSTRAINT after the event.\nDiscussion In the definition of table diary we have\ndy_companyfieldREFERENCEScompanies(co_id)Field dy_company is known as a \u0026ldquo;foreign key\u0026rdquo; since it refers to the key field (co_id) in a foreign table (companies).\nYou can do this after the event using:\nALTERTABLEdiaryADDCONSTRAINTdiary_company_refFOREIGNKEY(dy_company)REFERENCEScompanies(co_id);If there are values of dy_company that cannot be found in companies an error will be given.\nMaking sure each record has a unique value You want to make sure each order-id is unique since two orders with the same id-code is going to cause problems.\nSolution Either use the UNIQUE modifier on the field when defining the table, or create a UNIQUE index on that field (or fields) after the table is created.\nDiscussion It is customary to make sure there is a unique code for each record in a table (a primary key) so you can select that record and no other.\nIf you don\u0026rsquo;t know why this is a good idea, search the web for terms like \u0026ldquo;Normalisation\u0026rdquo; and \u0026ldquo;Normal forms\u0026rdquo;.\nWhen creating a table all the following fields will be forced to be unique.\nCREATETABLEfoo(field1serialfield2textUNIQUEfield3textPRIMARYKEYfield4text,field5textPRIMARYKEY(field4));CREATEUNIQUEINDEXfoo_field5_idxONfoo(field5); The serial type creates a UNIQUE NOT NULL int4 and attaches it to a sequence.\n The UNIQUE modifier creates a unique index on the value. You might want to add NOT NULL as well if the field should always have a value.\n The PRIMARY KEY is equivalent to UNIQUE NOT NULL.\n Which form you want to use will depend upon context and your personal preferences.\nAllowing only certain values in a field You have an enumerated field that can only take certain well-defined values, and want to restrict it to those values (e.g. a day-of-week field, a prime-number field) - you think a foreign key referencing a lookup table isn\u0026rsquo;t right in this case.\nSolution Add a CHECK constraint with a boolean expression that returns true when the field\u0026rsquo;s value is valid.\nDiscussion In the diary table, the dy_type field can only have certain values.\nCREATETABLEdiary(dy_typetextCHECK(dy_typeIN(\u0026#39;Created\u0026#39;,\u0026#39;Order\u0026#39;,\u0026#39;Delivery\u0026#39;,\u0026#39;Paid\u0026#39;,\u0026#39;Note\u0026#39;)),...Note that you need to be careful with this - if we add a new diary-type (say \u0026lsquo;Message\u0026rsquo;) you will need to change the table definition, whereas with a foreign key you would just add another row to the lookup table.\nPreventing changes to a field You want to effectively \u0026ldquo;lock\u0026rdquo; a field so that after the record has been inserted, that field can never be changed (a creation_date field for example).\nSolution You use an UPDATE trigger that masks the field.\nThat calls a function that either discards the change or raises an error if there is a change to the protected field.\nDiscussion To make sure the dy_timestamp field cannot be modified use:\nCREATEFUNCTIONnoupd_ts()RETURNSopaqueAS\u0026#39; BEGIN NEW.dy_timestamp = OLD.dy_timestamp RETURN NEW; END; \u0026#39;LANGUAGE\u0026#39;plpgsql\u0026#39;;CREATETRIGGERdiary_noupd_ts_trigBEFOREUPDATEONdiaryFOREACHROWEXECUTEPROCEDUREnoupd_ts();The function silently discards any changes to the dy_timestamp field if users update the diary table.\nReferences PostgreSQL SQL Create Table PostgreSQL SQL Alter Table PostgreSQL SQL Create Index PostgreSQL SQL Create Trigger PostgreSQL SQL Create Function PostgreSQL SQL Create Rule ","excerpt":"Making sure a related record exists Records in one table should all be connected to records in …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-constraining-to-your-data/","title":"PostgreSQL mini cookbook: Constraining your data"},{"body":"Restricting users to certain records or certain fields with views The accounts team don\u0026rsquo;t need to see unfilled orders and the sales team don\u0026rsquo;t need to see bank details. You want to enforce this.\nSolution Create one view for each group of users, and deny them access to the underlying table(s).\nDiscussion You can create alternative views of your database with CREATE VIEW \u0026lt;viewname\u0026gt; AS SELECT....\nTo a user this appears to be a table, but you can control what underlying data shows through. The SELECT query can be anything you like - it can involve JOINs, UNIONs or GROUP BY if you want. So, if the accounts department only needs to see completed orders:\nCREATEVIEWaccts_ordersASSELECT*FROMordersWHEREord_deliveredISNOTNULL;You then need to make sure that accounts has access to this view and not to the underlying table:\nGRANTALLONaccts_ordersTOaccounts;REVOKEALLONordersFROMaccounts;You will need to be a superuser (postgres) or the owner of the database objects to do this. Possible permissions are: SELECT, INSERT, UPDATE, DELETE, RULE, ALL.\nLetting users update views You want to allow users to make restricted updates using the view you have defined\nSolution Add rules to the view to redirect changes to the underlying table(s). Remember that Postgres won\u0026rsquo;t allow updates/inserts unless there is an unqualified rule that catches all changes.\nDiscussion To let users update a view you need to provide appropriate rules to Postgres with the CREATE RULE construct.\nIn the example of we want the accounts department to be able to alter orders but not delete them (goods have been shipped but not necessarily paid for).\nCREATERULEaccts_orders_upd_rule0ASONUPDATETOaccts_ordersDOINSTEADNOTHING;CREATERULEaccts_orders_upd_ruleASONUPDATETOaccts_ordersWHERENEW.ord_paid!=OLD.ord_paidOROLD.ord_paidISNULLDOINSTEADUPDATEordersSETord_paid=NEW.ord_paidWHEREord_id=NEW.ord_id;The first rule looks simple enough - instead of updating accts_orders do nothing instead. Why do we need it, since you can\u0026rsquo;t update rules anyway? Postgres won\u0026rsquo;t try to update a view unless there is a rule that covers all eventualities. Since the second rule has a WHERE clause we need an empty rule to cover all possible updates a user can attempt.\nThis second rule captures updates to the accts_orders view and translates them into update queries onto accts_orders. In addition it only updates the ord_paid field, ignoring others.\nThe NEW keyword represents the values the record is going to be updated with. The OLD keyword represents the record before the update takes place.\nWhat about permissions? The rule is executed with the permissions of its owner not the person who ends up executing it. So - if accounts don\u0026rsquo;t have the permissions to access the orders table that\u0026rsquo;s alright, as long as the user who creates the rule does.\nGrant privileges on all tables in one go You want to do something like GRANT ALL ON 'foo%' TO webuser.\nSolution You can\u0026rsquo;t do this directly from psql - you\u0026rsquo;ll need to write a shell-script or plpgsql function to automate it for you.\nDiscussion You can use the following shell script:\n###### start of grantall.sh ####### #!/bin/ash SQL=\u0026#34;SELECT relname FROM pg_class WHERE (relkind = \u0026#39;r\u0026#39; OR relkind = \u0026#39;S\u0026#39;) AND relname !~ \u0026#39;^pg_\u0026#39; ORDER BY relname\u0026#34; OBJ=`psql -t -c \u0026#34;${SQL}\u0026#34; $1` # OBJ=`echo ${OBJ} | sed \u0026#39;s/EOF//g\u0026#39;` OBJ=`echo ${OBJ} | sed \u0026#39;s/ /, /g\u0026#39;` # SQL=\u0026#34;REVOKE ALL ON ${OBJ} FROM PUBLIC\u0026#34; SQL=\u0026#34;GRANT ALL ON ${OBJ}TO PUBLIC\u0026#34; echo ${SQL} psql -c \u0026#34;${SQL}\u0026#34; $1 ###### end of grantall.sh ####### Or you can use this plpgsql function:\nSELECTpgx_grant(\u0026#39;ALL\u0026#39;,\u0026#39;comp%\u0026#39;,\u0026#39;nobody\u0026#39;);-- pgx_grant(PRIVILEGE, TABLES, USER) -- Grants PRIVILEGE to USER on objects like TABLES% -- Grants to tables, views and sequences. -- CREATEFUNCTIONpgx_grant(text,text,text)returnsint4as\u0026#39; DECLARE priv ALIAS FOR $1; patt ALIAS FOR $2; user ALIAS FOR $3; obj record; num integer; BEGIN num:=0; FOR obj IN SELECT relname FROM pg_class WHERE relname LIKE patt || \\\u0026#39;%\\\u0026#39; AND relkind in (\\\u0026#39;r\\\u0026#39;,\\\u0026#39;v\\\u0026#39;,\\\u0026#39;S\\\u0026#39;) LOOP EXECUTE \\\u0026#39;GRANT\\\u0026#39; || priv || \\\u0026#39;ON\\\u0026#39; || obj.relname || \\\u0026#39;TO\\\u0026#39; || user; num := num + 1; END LOOP; RETURN num; END; \u0026#39;language\u0026#39;plpgsql\u0026#39;;References PostgreSQL SQL Select PostgreSQL SQL Grant PostgreSQL SQL Create View PostgreSQL SQL Create Rule ","excerpt":"Restricting users to certain records or certain fields with views The accounts team don\u0026rsquo;t need …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-controlling-access-to-your-data/","title":"PostgreSQL mini cookbook: Controlling Access to your data"},{"body":"Having a dynamic field value without a lookup table You want a \u0026ldquo;calculated\u0026rdquo; column returned from a select but joining to a lookup table is either not practical or not desirable.\nSolution Use the CASE...WHEN...ELSE...END structure or write a function.\nDiscussion Let\u0026rsquo;s say we want to select orders and indicate whether or not they are pending, awaiting payment or complete. Obviously this depends on the dates ordered, delivered and paid but we can\u0026rsquo;t use these to index a lookup table since we don\u0026rsquo;t know what values they will have.\nSELECTord_id,ord_qty,CASEWHENord_paidISNOTNULLTHEN\u0026#39;Complete\u0026#39;WHENord_deliveredISNOTNULLTHEN\u0026#39;Awaiting payment\u0026#39;ELSE\u0026#39;Pending\u0026#39;ENDASstatusFROMorders;Note that the CASE conditions shortcut - that is the first match is the one returned, others are never tested.\nAlternatively, we could write a function taking the two dates and returning the status-text we desire.\nSELECTord_id,ord_qty,status(ord_paid,ord_delivered)FROMorders;See the reference manuals for how to build such a function.\nYou should write a function if it is going to be used in several places, otherwise the CASE is good for simple situations.\nHandling sub queries with NULL You have a sub select in a SELECT query but null values seem to short-circuit your results.\nSolution Make sure you handle the case with IS NOT NULL in the sub query.\nDiscussion This is correct - remember that the only test the NULL passes is IS NULL. So - if you have\nSELECTco_nameFROMcompaniesWHEREco_idNOTIN(SELECTdy_companyFROMdiary);You\u0026rsquo;d be expecting a list of companies without diary entries, and so long as dy_company is never null that\u0026rsquo;s what you\u0026rsquo;ll get. But if there\u0026rsquo;s a null value you\u0026rsquo;ll get no results at all. Why?\nWe can expand the query as follows:\nWHEREco_idNOTIN(SELECTdy_companyFROMdiary)WHEREco_idNOTIN(1,2,null,3...)WHERENOT(co_id=1ORco_id=2ORco_id=nullORco_id=3...)WHERENOT(null)WHEREnullRemember that Anything Null returns Null and it starts to make sense.\nTo solve it either make sure that dy_company is defined as NOT NULL in the table definition (avoid the whole issue) or explicitly check for this case.\nSELECTco_nameFROMcompaniesWHEREco_idNOTIN(SELECTdy_companyFROMdiaryWHEREdy_companyISNOTNULL);Altering table definitions You want to add a column to table foo.\nSolution Either:\n Create a new table bar with the additional field, copy the data over then delete foo and rename bar\n Use the ALTER TABLE ADD COLUMN command\n The first has the advantage that you can make more radical changes than just adding a column. The second is much quicker.\nDiscussion Even the best design needs occasional tweaking. To add a city column to the companies table you would use\nALTERTABLEcompaniesADDCOLUMNcity(text);You can also add indices and constraints to a table, rename columns or change the owner of a table. If you find something you can\u0026rsquo;t do just follow solution 1.\nReferences PostgreSQL Conditional Expressions PostgreSQL Queries PostgreSQL SQL Select PostgreSQL SQL Alter Table ","excerpt":"Having a dynamic field value without a lookup table You want a \u0026ldquo;calculated\u0026rdquo; column …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-advanced-query-tricks/","title":"PostgreSQL mini cookbook: Advanced Query Tricks"},{"body":"Enabling plpgsql You want to write functions and build triggers in Postgres' scripting language plpgsql.\nPL/pgSQL is a loadable procedural language for the PostgreSQL database system. The design goals of PL/pgSQL were to create a loadable procedural language that\n can be used to create functions and trigger procedures, adds control structures to the SQL language, can perform complex computations, inherits all user-defined types, functions, and operators, can be defined to be trusted by the server, is easy to use. Functions created with PL/pgSQL can be used anywhere that built-in functions could be used. For example, it is possible to create complex conditional computation functions and later use them to define operators or use them in index expressions.\nIn PostgreSQL 9.0 and later, PL/pgSQL is installed by default.\nSolution As superuser (postgres) use the command-line tool createlang .\nSo to activate plpgsql in database db1 use:\n$ createlang plpgsql db1 Recording a log of changes to a table You want to keep a log of changes made to certain tables in a separate log-table.\nSolution Use one or more triggers to trap the changes and write messages to the log table.\nDiscussion In the example database there is a diary table that lets users record notes against a company.\nIt would be useful if when an order is taken, the fact is recorded in the diary against that company. We\u0026rsquo;ll want to trap inserts to the orders table and build an appropriate message.\nCREATEFUNCTIONlog_new_orders()RETURNSopaqueAS\u0026#39; DECLARE product_desc text; msg text; BEGIN SELECT INTO product_desc pr_desc FROM products WHERE pr_id = NEW.ord_product; msg := \u0026#39;\u0026#39;New order: \u0026#39;\u0026#39; || NEW.ord_qty || \u0026#39;\u0026#39; items of \u0026#39;\u0026#39; || product_desc; INSERT INTO DIARY (dy_company,dy_type,dy_notes) VALUES (NEW.ord_company,\u0026#39;\u0026#39;ORDER\u0026#39;\u0026#39;,msg); RETURN NEW; END; \u0026#39;language\u0026#39;plpgsql\u0026#39;;CREATETRIGGERorder_new_log_trigAFTERINSERTONordersFOREACHROWEXECUTEPROCEDURElog_new_orders();Note: the doubling of quotes in the body of the function - they are two single quotes (') not one double (\u0026quot;).\nUpdating a \u0026ldquo;last changed\u0026rdquo; field You want a \u0026ldquo;last changed\u0026rdquo; timestamp on a table that gets automatically updated every time a user inserts/updates a record.\nSolution Define update/insert triggers on the table in question.\nDiscussion To automatically update co_lastchg every time a company record is inserted or updated use:\nCREATEFUNCTIONset_co_lastchg()RETURNSopaqueAS\u0026#39; BEGIN NEW.co_lastchg = now(); RETURN NEW; END; \u0026#39;language\u0026#39;plpgsql\u0026#39;;CREATETRIGGERco_lastchg_trigBEFOREINSERTORUPDATEONcompaniesFOREACHROWEXECUTEPROCEDUREset_co_lastchg();You can repeat this for every timestamp to be updated.\nReferences PostgreSQL SQL Create Table PostgreSQL SQL Create Trigger PostgreSQL PL/pgSQL - SQL Procedural Language ","excerpt":"Enabling plpgsql You want to write functions and build triggers in Postgres' scripting language …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-automating-processes/","title":"PostgreSQL mini cookbook: Automating processes"},{"body":"Sum a field You want to calculate the total number of payments per customer, staff.\nSolution Use SUM() and GROUP BY:\nSELECTa,b,sum(c)FROMtGROUPBYa,b;Example:\n#SELECT*FROMpayment;payment_id|customer_id|staff_id|rental_id|amount|payment_date------------+-------------+----------+-----------+--------+---------------------------- 17503|341|2|1520|7.99|2007-02-1522:25:46.99657717504|341|1|1778|1.99|2007-02-1617:23:14.99657717505|341|1|1849|7.99|2007-02-1622:41:45.99657717506|341|2|2829|2.99|2007-02-1919:39:56.99657717507|341|2|3130|7.99|2007-02-2017:31:48.99657717508|341|1|3382|5.99|2007-02-2112:33:49.996577#SELECTcustomer_id,staff_id,SUM(amount)FROMpaymentGROUPBYcustomer_id,staff_id;customer_id|staff_id|sum-------------+----------+-------- 476|1|44.88205|2|48.91344|1|12.95598|1|43.9014|1|55.84Discussion You need to construct a SELECT query with a GROUP BY clause and apply a sum() function. So, to find the total number of orders we have per product in the system we can do:\nSELECTp.pr_code,p.pr_desc,sum(o.ord_qty)ASquantityFROMproductsp,ordersoWHEREp.pr_code=o.ord_productGROUPBYp.pr_code,p.pr_desc;So why do we GROUP BY both the product-code and description, surely they match up? Well, they do, but if you return a field from a query it should either be mentioned in the GROUP BY or be subject to an aggregate function (such as sum).\nAs an alternative we could have used:\nSELECTp.pr_code,min(p.pr_desc),sum(o.ord_qty)ASquantityFROMproductsp,ordersoWHEREp.pr_code=o.ord_productGROUPBYp.pr_code;Which achieves the same since for any given pr_code we only have one pr_desc but probably isn\u0026rsquo;t as clear.\nFinding the maximum/minimum value You\u0026rsquo;re not interested in how many widgets your biggest customer bought but you do want to know who they are.\nSolution Use a subquery that finds the max() of the quantity you want to measure and compare against it.\nDiscussion This is similar to totalling, but you use the min/max functions instead of sum. In addition, we need to compare individual records against this maximum value. So, to get the company name and order details of the largest order in the system:\nSELECTc.co_name,p.pr_code,p.pr_desc,o.ord_qtyFROMcompaniesc,productsp,ordersoWHEREc.co_id=o.ord_companyANDp.pr_code=o.ord_productANDo.ord_qty=(SELECTmax(ord_qty)FROMorders);If there are two or more orders both have the same largest quantity, they will both be returned.\nCounting doesn\u0026rsquo;t give me the total number of records in a table You know there are 100 records in this table but count(field) returns less than that.\nSolution Use count(*) to avoid skipping NULL values in a specific field.\nDiscussion You try to count the number of diary entries in the system:\nSELECTcount(dy_notes)FROMdiary;You find that entries with NULL dy_notes are being skipped. This is the correct behavior:\n count() only counts non-null values.\n The way of solving this is:\nSELECTcount(*)FROMdiary;I want to know how many types of X are in the system You have a thousands of products in your range but suspect most don\u0026rsquo;t sell. You want a list of product-types that are in your orders list.\nSolution You can GROUP BY the product-code and sum quantity if you want to know that, or use count(distinct \u0026lt;field\u0026gt;).\nDiscussion In practice, you will probably want to see how many of each product you\u0026rsquo;ve sold.\nSELECTord_product,sum(ord_qty)FROMordersGROUPBYord_product;If you don\u0026rsquo;t you can use\nSELECTcount(distinctord_product)FROMorders;This ignores null values of ord_product and throws away duplicates.\nDefining your own aggregate function You work for NASA and min(), max(), sum() etc. aren\u0026rsquo;t enough for you.\nSolution Create your own aggregate function with CREATE AGGREGATE and an accumulator function.\nDiscussion If you\u0026rsquo;re planning on doing this without reading the manuals think again. Basically however you need to define:\n The return-type of the aggregate function (e.g. int4) The type of thing it aggregates (e.g. int4 again) An initial value (probably 0) A state-transition function to accumulate values (takes the running total and the next value) Optionally a finalisation function to produce the final value (useful for averages or standard deviations) You might well end up coding the state-transition and finalisation functions in C, but here is an trivial one-liner.\nCREATEAGGREGATEcatenate(sfunc1=textcat,basetype=text,stype1=text,initcond1=\u0026#39;\u0026#39;);This sets the initial condition to '' (the empty string), accepts and returns text and uses the built-in textcat function to concatenate string values.\nNOTE - order of concatenated text is not well-defined. You should only use commutable functions such as +, * etc (subnote - commutable might not be right I might mean \u0026lsquo;associative\u0026rsquo;. If you don\u0026rsquo;t know whether I\u0026rsquo;m right or wrong, make sure you test your aggregate function carefully).\nReferences PostgreSQL Aggregate Functions PostgreSQL Queries ","excerpt":"Sum a field You want to calculate the total number of payments per customer, staff.\nSolution Use …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-aggregate-query-tricks/","title":"PostgreSQL mini cookbook: Aggregate Query Tricks"},{"body":"Case insensitive searches You want to check equality or do a regular expression search but ignoring case\nSolution Either use lower() on the field and the value being compared or use the ILIKE or ˜˜* regular expression operators.\nDiscussion If you want to do a simple comparison of a text field use the lower() or upper() functions:\nSELECT*FROMcompaniesWHERElower(\u0026#39;Archonet\u0026#39;)=lower(co_name);If you want to do a case-insensitive wildcard match use the ILIKE keyword or ˜˜* operator:\nSELECT*FROMcompaniesWHEREco_nameILIKE\u0026#39;Arc%\u0026#39;;Note that both ILIKE and ˜˜* are locale-dependent and are Postgres-specific.\nEscaping LIKE wildcards You want a wildcard match with LIKE but need to match a literal underscore or percentage sign.\nSolution Escape the wildcard character with a backslash - remember you will need two backslashes to get one through the string processor.\nDiscussion If you want to match \u0026ldquo;20% increase\u0026hellip;\u0026rdquo; but not \u0026ldquo;200 increase\u0026hellip;\u0026rdquo; you will need something like:\nSELECT*FROMfooWHEREaLIKE\u0026#39;20\\\\% increase%\u0026#39;;The above is when typed from psql, and you need two backslashes because Postgres' string processor boils two backslashes down into one. If you were building a query string in (say) PHP you would need four - PHP will reduce this to two in the variable and Postgres to one by the time it reaches the LIKE\n$sql=\u0026#34;SELECT * FROM foo WHERE a LIKE \u0026#39;20\\\\\\\\% increase%\u0026#39;\u0026#34;;Custom escape character If you are worried about a world backslash shortage you can use the ESCAPE qualifier to use a different character instead of backslash:\nSELECT*FROMfooWHEREaLIKE\u0026#39;20X% increase%\u0026#39;ESCAPE\u0026#39;X\u0026#39;;You\u0026rsquo;ll need to make sure you double X characters where they occur if you use this. Oh - and other people\u0026rsquo;s string quoting functions won\u0026rsquo;t be expecting this, so be careful.\nQuery records without a corresponding key in another table You want to find all the records in table A which don\u0026rsquo;t have a corresponding record in table B.\nSolution Use NOT IN or a LEFT | RIGHT JOIN\nDiscussion If you\u0026rsquo;ve imported data and want to make sure the data matches between tables, you could use something like the following:\nSELECTdy_id,dy_companyfromdiaryLEFTJOINcompaniesONdy_company=co_idWHEREco_idISNULL;This will select all diary entries whether or not there is a matching company entry and then filter out those that have matches.\nAlternatively, you can use NOT IN:\nSELECTdy_id,dy_companyfromdiaryWHEREdy_companyNOTIN(SELECTco_idFROMcompanies);Which one to use is a matter of taste and which you find most efficient (but bear in mind [not-in-nulls] with NULLs and NOT IN).\nReturning the first N results You don\u0026rsquo;t want all million rows returned at once, you want a page at a time.\nSolution Use the LIMIT keyword to modify your SELECT.\nDiscussion If you want to limit your results to a manageable size, use the LIMIT keyword in your query. So to get the first five results:\nSELECT*FROMstaffORDERBYusernameLIMIT5;Note you should always have an ORDER BY clause, otherwise you won\u0026rsquo;t know which five results you are getting.\nReturning the next N results You want the second (or fifteenth) page of your results.\nSolution Use the OFFSET keyword to modify your LIMIT.\nDiscussion To get a second or subsequent \u0026ldquo;page\u0026rdquo; of results, add the OFFSET keyword to your query:\nSELECT*FROMcompaniesORDERBYco_idLIMIT5OFFSET5;Returning the last N results You want to skip directly to the last page of your results.\nSolution Calculate how many rows there are in the full results-set and use an appropriate OFFSET or do a reverse-sort.\nDiscussion There is no way to directly return the last page of a results set, but you can try:\nSELECTcount(*)FROMcompanies;And take the result from that (N say) to calculate an offset of N-P in your OFFSET (see [return-next-n]). Remember that the last page might only be half full though, so you want N mod P not N-P if you are being strict about these things.\nAlternatively, you can do:\nSELECT*FROMcompaniesORDERBYco_idDESCLIMIT5;This gives you the first five results but has sorted them in a reverse order. If you can\u0026rsquo;t be bothered to reverse them in your application you can use a view (or a temporary table).\nCREATEVIEWtmp_co_viewASSELECT*FROMcompaniesORDERBYco_idDESCLIMIT5;SELECT*FROMtmp_co_viewORDERBYco_id;This grabs the page we want in reverse order then re-sorts it. Don\u0026rsquo;t forget to drop the view when you finish with it.\nSelecting part of a date You want to compare/calculate/display part of a date/time (an hour, day, month etc).\nSolution Use the date_part(\u0026lt;part\u0026gt;,\u0026lt;date | time | interval\u0026gt;) function.\nDiscussion Sometimes you want to summarise results per month or select entries for the first day of the month. The simplest way to do this is to use the date_part() function. So, to see all orders placed in January, use:\n=#selectusername,date_part(\u0026#39;year\u0026#39;,last_update),date_part(\u0026#39;month\u0026#39;,last_update)fromstaffwheredate_part(\u0026#39;month\u0026#39;,last_update)=5;username|date_part|date_part----------+-----------+----------- Mike|2006|5Jon|2006|5You can use date_part to return:\n year month day hour minute second dow for the day of the week (Sunday is 0, Saturday is 6). Converting a date to unix timestamp (epoch seconds) You want to compare a Postgresql date or timestamp to a unix time (seconds since the epoch).\nSolution Use date_part() or extract()\nDiscussion If you are planning to do a lot of temporal manipulation, always use Postgresql\u0026rsquo;s date/time types - they offer better features.\nOn the other hand, most client languages provide unix-style timestamps - these two functions can bridge the gap for you.\n=#selectdate_part(\u0026#39;epoch\u0026#39;,now())asunixtime;unixtime------------------ 1582594120.25834=#selectextract(\u0026#39;epoch\u0026#39;fromnow())asunixtime;unixtime------------------ 1582594120.25834Combining two sets of results You have two (or more) queries returning the same fields and want to merge their output.\nSolution Use the UNION keyword to join your two SELECT statements.\nTo see a real-world example of this run psql -E and type \\dt to see tables.\nDiscussion Let\u0026rsquo;s assume we add a diary_archive table and move entries from diary into it once they are older than 6 months. Sooner or later you are going to want to see all the diary entries for a company both current and archived, so:\nSELECT*FROMdiaryWHEREdy_company=1UNIONSELECT*FROMdiary_archiveWHEREdy_company=1ORDERBYdy_id;Note that we only need one ORDER BY to sort the output of the combined query. Also, the fields in this case were the same, but this doesn\u0026rsquo;t need to be the case. The important thing is that the types match - if the field1 from the first select is an int8 field1 from the second select should be too.\nReferences PostgreSQL Date/Time Functions and Operators PostgreSQL Queries ","excerpt":"Case insensitive searches You want to check equality or do a regular expression search but ignoring …","ref":"https://djangocas.dev/blog/postgresql/postgresql-mini-cookbook-basic-query-tricks/","title":"PostgreSQL mini cookbook: Basic Query Tricks"},{"body":"str.lower() and str.casefold() Starting with Python 3.0, strings are stored as Unicode.\nPython defined to two functions str.lower() and str.casefold() can be used to convert string to lowercase:\nstr.lower() Return a copy of the string with all the cased characters 4 converted to lowercase. The lowercasing algorithm used is described in section 3.13 of the Unicode Standard.\n str.casefold() Return a casefolded copy of the string. Casefolded strings may be used for caseless matching. Casefolding is similar to lowercasing but more aggressive because it is intended to remove all case distinctions in a string. For example, the German lowercase letter \u0026lsquo;ß\u0026rsquo; is equivalent to \u0026ldquo;ss\u0026rdquo;.\nSince it is already lowercase, lower() would do nothing to \u0026lsquo;ß\u0026rsquo;; casefold() converts it to \u0026ldquo;ss\u0026rdquo;.\n Python\u0026rsquo;s casefold() implements the Unicode\u0026rsquo;s toCasefold(). NFKC_Casefold provides a mapping designed for best behavior when doing caseless matching of strings interpreted as identifiers.\nExample usage of lower() and casefold() in python:\n\u0026gt;\u0026gt;\u0026gt; import unicodedata \u0026gt;\u0026gt;\u0026gt; def casefold(s): ... return unicodedata.normalize(\u0026#39;NFKC\u0026#39;, s).casefold() ... \u0026gt;\u0026gt;\u0026gt; s = \u0026#39;AÁÀÃÂÄÅĀĂĄ-ḂƁḄḆƂƄɃ-ĆĈĊČƇÇḈȻ-ḊƊḌḎḐḒĎÐĐƉ-ƋÈÉÊẼĒĔĖËẺĚȄȆẸ-ß\u0026#39; \u0026gt;\u0026gt;\u0026gt; s.lower() \u0026#39;aáàãâäåāăą-ḃɓḅḇƃƅƀ-ćĉċčƈçḉȼ-ḋɗḍḏḑḓďðđɖ-ƌèéêẽēĕėëẻěȅȇẹ-ß\u0026#39; \u0026gt;\u0026gt;\u0026gt; unicodedata.normalize(\u0026#39;NFKC\u0026#39;, s).casefold() \u0026#39;aáàãâäåāăą-ḃɓḅḇƃƅƀ-ćĉċčƈçḉȼ-ḋɗḍḏḑḓďðđɖ-ƌèéêẽēĕėëẻěȅȇẹ-ss\u0026#39; \u0026gt;\u0026gt;\u0026gt; unicodedata.normalize(\u0026#39;NFKC\u0026#39;, s).casefold().islower() True \u0026gt;\u0026gt;\u0026gt; unicodedata.normalize(\u0026#39;NFKC\u0026#39;, s).casefold() == s.lower() False # Becare about this two \u0026#39;K\u0026#39;, they are different in upper case \u0026gt;\u0026gt;\u0026gt; k1 = \u0026#39;K\u0026#39; # The first \u0026#39;K\u0026#39; code point is 0x212A \u0026gt;\u0026gt;\u0026gt; k2 = \u0026#39;K\u0026#39; \u0026gt;\u0026gt;\u0026gt; hex(ord(k1)) \u0026#39;0x212a\u0026#39; \u0026gt;\u0026gt;\u0026gt; hex(ord(k2)) \u0026#39;0x4b\u0026#39; \u0026gt;\u0026gt;\u0026gt; k1 == k2 False \u0026gt;\u0026gt;\u0026gt; k1.lower() == k2.lower() True \u0026gt;\u0026gt;\u0026gt; casefold(k1) == casefold(k2) True Here comes the question, what is caseless matching?\nUnicode Default Caseless Matching The Unicode Standard Chapter 3.13 defines the default caseless matching. Default caseless matching is the process of comparing two strings for case-insensitive equality. The definitions of Unicode Default Caseless Matching build on the definitions of Unicode Default Case Folding.\nDefault Caseless Matching uses full case folding:\nA string X is a caseless match for a string Y if and only if: toCasefold(X) = toCasefold(Y) When comparing strings for case-insensitive equality, the strings should also be normalized for most correct results. For example, the case folding of U+00C5 Å latin capital letter a with ring above is U+00E5 å latin small letter a with ring above, whereas the case folding of the sequence \u0026lt;U+0041 “A” latin capital letter a, U+030A Ää combining ring above\u0026gt; is the sequence \u0026lt;U+0061 “a” latin small letter a, U+030A Ää combining ring above\u0026gt;. Simply doing a binary comparison of the results of case folding both strings will not catch the fact that the resulting case-folded strings are canonicalequivalent sequences. In principle, normalization needs to be done after case folding, because case folding does not preserve the normalized form of strings in all instances. This requirement for normalization is covered in the following definition for canonical caseless matching:\nD145 A string X is a canonical caseless match for a string Y if and only if: NFD(toCasefold(NFD(X))) = NFD(toCasefold(NFD(Y))) The invocations of canonical decomposition (NFD normalization) before case folding in D145 are to catch very infrequent edge cases. Normalization is not required before case folding, except for the character U+0345 n combining greek ypogegrammeni and any characters that have it as part of their canonical decomposition, such as U+1FC3 o greek small letter eta with ypogegrammeni. In practice, optimized versions of canonical caseless matching can catch these special cases, thereby avoiding an extra normalization step for each comparison. In some instances, implementers may wish to ignore compatibility differences between characters when comparing strings for case-insensitive equality. The correct way to do this makes use of the following definition for compatibility caseless matching:\nA string X is a compatibility caseless match for a string Y if and only if: NFKD(toCasefold(NFKD(toCasefold(NFD(X))))) = NFKD(toCasefold(NFKD(toCasefold(NFD(Y))))) Compatibility caseless matching requires an extra cycle of case folding and normalization for each string compared, because the NFKD normalization of a compatibility character such as U+3392 square mhz may result in a sequence of alphabetic characters which must again be case folded (and normalized) to be compared correctly. Caseless matching for identifiers can be simplified and optimized by using the NFKC_- Casefold mapping. That mapping incorporates internally the derived results of iterated case folding and NFKD normalization. It also maps away characters with the property value Default_Ignorable_Code_Point = True, which should not make a difference when comparing identifiers. The following defines identifier caseless matching:\nA string X is an identifier caseless match for a string Y if and only if: toNFKC_Casefold(NFD(X)) = toNFKC_Casefold(NFD(Y)) Special upper case transformation Char Code Point Output Char ß 0x00DF SS ı 0x0131 I ſ 0x017F S ﬀ 0xFB00 FF ﬁ 0xFB01 FI ﬂ 0xFB02 FL ﬃ 0xFB03 FFI ﬄ 0xFB04 FFL ﬅ 0xFB05 ST ﬆ 0xFB06 ST Special lower case transformation Char Code Point Output Char K 0x212A k Related pages: Get the IP address of a network interface by its name in Python on Linux an Mac OS X How to Parse URLs in Python: A Comprehensive Guide with Examples Python: How to print literal curly brace { or } in f-string and format string Reference str.casefold() The Unicode Standard Chapter 3.13 ","excerpt":"str.lower() and str.casefold() Starting with Python 3.0, strings are stored as Unicode.\nPython …","ref":"https://djangocas.dev/blog/python/python-unicode-string-lowercase-casefold-caseless-match/","title":"Python unicode string to lower case and caseless match"},{"body":"psql shell command List exist databases $ psql --list List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ------------------------+-------+----------+-------------+-------------+------------------- dvdrental | dbch | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | dbch | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | dbch | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/dbch + | | | | | dbch=CTc/dbch template1 | dbch | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/dbch + | | | | | dbch=CTc/dbch (4 rows) Conntect to database $ psql \u0026lt;dbname\u0026gt; Load SQL from file $ psql \u0026lt; file.sql psql interactive command \\? - Get help # \\? General \\copyright show PostgreSQL usage and distribution terms \\g [FILE] or ; execute query (and send results to file or |pipe) \\gset [PREFIX] execute query and store results in psql variables \\h [NAME] help on syntax of SQL commands, * for all commands \\q quit psql \\watch [SEC] execute query every SEC seconds Query Buffer \\e [FILE] [LINE] edit the query buffer (or file) with external editor \\ef [FUNCNAME [LINE]] edit function definition with external editor \\p show the contents of the query buffer \\r reset (clear) the query buffer \\s [FILE] display history or save it to file \\w FILE write query buffer to file Input/Output \\copy ... perform SQL COPY with data stream to the client host \\echo [STRING] write string to standard output \\i FILE execute commands from file \\ir FILE as \\i, but relative to location of current script \\o [FILE] send all query results to file or |pipe \\qecho [STRING] write string to query output stream (see \\o) Informational (options: S = show system objects, + = additional detail) \\d[S+] list tables, views, and sequences \\d[S+] NAME describe table, view, sequence, or index \\da[S] [PATTERN] list aggregates \\db[+] [PATTERN] list tablespaces \\dc[S+] [PATTERN] list conversions \\dC[+] [PATTERN] list casts \\dd[S] [PATTERN] show object descriptions not displayed elsewhere \\ddp [PATTERN] list default privileges \\dD[S+] [PATTERN] list domains \\det[+] [PATTERN] list foreign tables \\des[+] [PATTERN] list foreign servers \\deu[+] [PATTERN] list user mappings \\dew[+] [PATTERN] list foreign-data wrappers \\df[antw][S+] [PATRN] list [only agg/normal/trigger/window] functions \\dF[+] [PATTERN] list text search configurations \\dFd[+] [PATTERN] list text search dictionaries \\dFp[+] [PATTERN] list text search parsers \\dFt[+] [PATTERN] list text search templates \\dg[+] [PATTERN] list roles \\di[S+] [PATTERN] list indexes \\dl list large objects, same as \\lo_list \\dL[S+] [PATTERN] list procedural languages \\dm[S+] [PATTERN] list materialized views \\dn[S+] [PATTERN] list schemas \\do[S] [PATTERN] list operators \\dO[S+] [PATTERN] list collations \\dp [PATTERN] list table, view, and sequence access privileges \\drds [PATRN1 [PATRN2]] list per-database role settings \\ds[S+] [PATTERN] list sequences \\dt[S+] [PATTERN] list tables \\dT[S+] [PATTERN] list data types \\du[+] [PATTERN] list roles \\dv[S+] [PATTERN] list views \\dE[S+] [PATTERN] list foreign tables \\dx[+] [PATTERN] list extensions \\dy [PATTERN] list event triggers \\l[+] [PATTERN] list databases \\sf[+] FUNCNAME show a function's definition \\z [PATTERN] same as \\dp Formatting \\a toggle between unaligned and aligned output mode \\C [STRING] set table title, or unset if none \\f [STRING] show or set field separator for unaligned query output \\H toggle HTML output mode (currently off) \\pset [NAME [VALUE]] set table output option (NAME := {border|columns|expanded|fieldsep|fieldsep_zero| footer|format|linestyle|null|numericlocale|pager| recordsep|recordsep_zero|tableattr|title|tuples_only}) \\t [on|off] show only rows (currently off) \\T [STRING] set HTML \u0026lt;table\u0026gt; tag attributes, or unset if none \\x [on|off|auto] toggle expanded output (currently off) Connection \\c[onnect] {[DBNAME|- USER|- HOST|- PORT|-] | conninfo} connect to new database (currently \u0026quot;dvdrental\u0026quot;) \\encoding [ENCODING] show or set client encoding \\password [USERNAME] securely change the password for a user \\conninfo display information about current connection Operating System \\cd [DIR] change the current working directory \\setenv NAME [VALUE] set or unset environment variable \\tidbch [on|off] toggle tidbch of commands (currently off) \\! [COMMAND] execute command in shell or start interactive shell Variables \\prompt [TEXT] NAME prompt user to set internal variable \\set [NAME [VALUE]] set internal variable, or list all if no parameters \\unset NAME unset (delete) internal variable Large Objects \\lo_export LOBOID FILE \\lo_import FILE [COMMENT] \\lo_list \\lo_unlink LOBOID large object operations \\q - Exit psql shell To exit psql shell, use Ctrl+D or \\q:\ndvdrental=# \\q \\d - List tables, views, and sequences dvdrental=# \\d List of relations Schema | Name | Type | Owner --------+----------------------------+----------+------- public | actor | table | dbch public | actor_actor_id_seq | sequence | dbch public | actor_info | view | dbch public | address | table | dbch public | address_address_id_seq | sequence | dbch public | category | table | dbch public | category_category_id_seq | sequence | dbch public | city | table | dbch public | city_city_id_seq | sequence | dbch public | country | table | dbch public | country_country_id_seq | sequence | dbch public | customer | table | dbch public | customer_customer_id_seq | sequence | dbch public | customer_list | view | dbch public | film | table | dbch public | film_actor | table | dbch public | film_category | table | dbch public | film_film_id_seq | sequence | dbch public | film_list | view | dbch public | inventory | table | dbch public | inventory_inventory_id_seq | sequence | dbch public | language | table | dbch public | language_language_id_seq | sequence | dbch public | nicer_but_slower_film_list | view | dbch public | payment | table | dbch public | payment_payment_id_seq | sequence | dbch public | rental | table | dbch public | rental_rental_id_seq | sequence | dbch public | sales_by_film_category | view | dbch public | sales_by_store | view | dbch public | staff | table | dbch public | staff_list | view | dbch public | staff_staff_id_seq | sequence | dbch public | store | table | dbch public | store_store_id_seq | sequence | dbch (35 rows) \\db - List table spaces management_development=# \\db List of tablespaces Name | Owner | Location ------------+-------+---------- pg_default | dbch | pg_global | dbch | (2 rows) \\dt - List tables dvdrental=# \\dt List of relations Schema | Name | Type | Owner --------+---------------+-------+------- public | actor | table | dbch public | address | table | dbch public | category | table | dbch public | city | table | dbch public | country | table | dbch public | customer | table | dbch public | film | table | dbch public | film_actor | table | dbch public | film_category | table | dbch public | inventory | table | dbch public | language | table | dbch public | payment | table | dbch public | rental | table | dbch public | staff | table | dbch public | store | table | dbch (15 rows) Check table schema PostgreSQL store table schema in information_schema, use following SQL to get column definition for specific table:\ndvdrental=# SELECT column_name, data_type, is_nullable, column_default \\ FROM information_schema.columns \\ WHERE table_name = 'customer'; column_name | data_type | is_nullable | column_default -------------+-----------------------------+-------------+----------------------------------------------- customer_id | integer | NO | nextval('customer_customer_id_seq'::regclass) store_id | smallint | NO | first_name | character varying | NO | last_name | character varying | NO | email | character varying | YES | address_id | smallint | NO | activebool | boolean | NO | true create_date | date | NO | ('now'::text)::date last_update | timestamp without time zone | YES | now() active | integer | YES | (10 rows) References PostgreSQL: Accessing a Database psql — PostgreSQL interactive terminal ","excerpt":"psql shell command List exist databases $ psql --list List of databases Name | Owner | Encoding | …","ref":"https://djangocas.dev/blog/postgresql/psql-101-introduction-to-postgresql-psql/","title":"psql 101 - Introduction to PostgreSQL Shell for Database Interactive Terminal"},{"body":"Symptom We deployed a very simple Azure function with nodejs runtime, on an Linux container. However after deployment, the service is not stable stable, it goes up and down, server random response 500 Internal error to client.\nFrom Azure\u0026rsquo;s log, it indicate Azure function: Did not find any initialized language workers:\n2020-02-13 19:21:44.682 Error Executed 'Functions.foo' (Failed, Id=4ff2c8f3-4504-4f6d-bf9c-886409c5f517) 2020-02-13 19:21:44.689 Error Did not find any initialized language workers Tried to search this error online and lot of recommendation is setting environment var WEBSITE_NODE_DEFAULT_VERSION for nodejs, We tried to set WEBSITE_NODE_DEFAULT_VERSION to ~10 to make sure it can have a valid nodejs runtime. However this does not solve issue.\nMitigation Since un-know the root cause of problem, we end up re-create function app in another region, with a windows machine, a new app service plan. It solve the issue.\nWe previous create function app in an exist app service plan, and there is issue on create function app in exist app plan. not sure related or not:\n this resource group already contains regular (i.e. non-Dynamic or Premium) Web Apps in the same region that you\u0026rsquo;re trying to create the Function App. This can even occur if you are creating a Azure Functions Premium Plan in a resource group that has an App Service Premium Plan of the same OS.\n Reference Creating Function Apps in an existing Resource Group ","excerpt":"Symptom We deployed a very simple Azure function with nodejs runtime, on an Linux container. However …","ref":"https://djangocas.dev/blog/azure/troubleshooting-azure-function-did-not-find-any-initialized-language-workers/","title":"Troubleshooting Azure function app: Did not find any initialized language workers"},{"body":"Use .GitInfo or .Page.Lastmod Hugo have build-in support to get the last Git revision information for every content file through Page.Lastmod or .GitInfo variable. Page.Lastmod is fetched from .GitInfo.AuthorDate.\nTo enable Hugo get git commit info, first need change enableGitInfo to true in config.toml:\n# config.toml enableGitInfo = true Then in any page template can use .GitInfo or .Page.Lastmod to get current file\u0026rsquo;s the latest git commit info.\nLast Update: \u0026lt;time datetime=\u0026#34;{{ .Page.Lastmod.Format \u0026#34;Mon Jan 10 17:13:38 2020 -0700\u0026#34; }}\u0026#34; class=\u0026#34;text-muted\u0026#34;\u0026gt; {{ $.Page.Lastmod.Format \u0026#34;January 02, 2006\u0026#34; }} \u0026lt;/time\u0026gt; Troubleshooting .GitInfo is null in local hugo serve You need commit file to make .GitInfo have validate data.\nPer hugo document:\n The .GitInfo feature must be enabled in your Hugo project by passing \u0026ndash;enableGitInfo flag on the command line or by setting enableGitInfo to true in your site’s configuration file.\n This is not accurate, setting enableGitInfo to true in your site’s configuration file is not enough. If you run a dev server by hugo serve, the .GitInfo also is null. You have to add --enableGitInfo to get .GitInfo:\n$ hugo serve --enableGitInfo Check the content of .GitInfo You may use jsonify to serialize .GitInfo and display it on page:\n{{ .GitInfo | jsonify }} Here is an example output of {{ .GitInfo | jsonify }}:\n{ \u0026#34;hash\u0026#34;:\u0026#34;f9ede6c53eed4753abe9f4ad5303a5c0fffc7b5a\u0026#34;, \u0026#34;abbreviatedHash\u0026#34;:\u0026#34;f9ede6c\u0026#34;, \u0026#34;subject\u0026#34;:\u0026#34;show last update through git commit info\u0026#34;, \u0026#34;authorName\u0026#34;:\u0026#34;...\u0026#34;, \u0026#34;authorEmail\u0026#34;:\u0026#34;...\u0026#34;, \u0026#34;authorDate\u0026#34;:\u0026#34;2020-02-13T15:01:40-08:00\u0026#34;, \u0026#34;commitDate\u0026#34;:\u0026#34;2020-02-13T15:01:40-08:00\u0026#34; } Example usage of .GitInfo:\n{{- if .GitInfo }} \u0026lt;p style=\u0026#34;font-size: small; color: grey;\u0026#34;\u0026gt;Last commit: {{ .GitInfo.AbbreviatedHash }} {{.GitInfo.CommitDate}}\u0026lt;/p\u0026gt; {{- end }} or use with:\n{{ with .GitInfo }} \u0026lt;p style=\u0026#34;font-size: small; color: grey;\u0026#34;\u0026gt;Page version: {{ .AbbreviatedHash }} {{ .CommitDate.Format \u0026#34;2006-01-02\u0026#34;}}\u0026lt;/p\u0026gt; {{- end }} Note Have to check null of .GitInfo use if or with, because newly created page donot have git info yet. Otherwise will get following error:\nexecuting \u0026quot;main\u0026quot; at \u0026lt;.GitInfo.AbbreviatedHash\u0026gt;: nil pointer evaluating *gitmap.GitInfo.AbbreviatedHash Related pages: Demystifying Hugo Shortcodes: Your Ultimate Guide Hugo: How to escape shortcode in markdown Add comments to Static blog like Hugo, Jekyll with Isso Tips on Hugo SEO Custom hugo RSS template Hugo troubleshooting: execute of template failed: can\u0026#39;t give argument to non-function References Hugo: .GitInfo Variables ","excerpt":"Use .GitInfo or .Page.Lastmod Hugo have build-in support to get the last Git revision information …","ref":"https://djangocas.dev/blog/add-git-commit-date-as-last-update-date-in-hugo-page/","title":"Add git commit date as last update date in hugo page"},{"body":"Problem I have Azure devops pipeline to build docker image from source. I want the docker image have the source code revision info like git commit hash.\nI tried to use Build.SourceVersion as a docker image tag,\nBuild.SourceVersion :\n The latest version control change that is included in this build.\n Git: The commit ID. TFVC: the changeset. This variable is agent-scoped, and can be used as an environment variable in a script and as a parameter in a build task, but not as part of the build number or as a version control tag.\n I set my docker image tag in Docker task as:\n$(Build.SourceBranch)-$(Build.BuildId)-$(Build.SourceVersion) Then I trigger a build, I hope it can generate tag like this:\nmaster-8219-59af41e However it generate tag like this (missing commit):\nmaster-8219- When I trigger a build, I notice there is a Commit field. I didn\u0026rsquo;t input anything and it should be the latest commit. However it seems Azure pipeline didn\u0026rsquo;t pass the latest commit to Build.SourceVersion.\nSolution To solve this issue. I use Azure pipeline environment var to pass the commit hash to docker image tag. The trick is create a Bash Script task to set environment var.\nThe Bash Script content as following:\nGIT_COMMIT=$(git rev-parse --short HEAD) echo \u0026#34;GIT_COMMIT: ${GIT_COMMIT}\u0026#34; # # set env variable to allow next task to consume # echo \u0026#34;##vso[task.setvariable variable=GIT_COMMIT]${GIT_COMMIT}\u0026#34; Now in next Azure pipeline task Push Docker Image, it use access var GIT_COMMIT through $(GIT_COMMIT).\nNow trigger manual build you will get docker image tag with git commit. e.g.\nmaster-8219-59af41e Reference Pass variable in Azure devops pipelines Azure pipelines: Define variables Azure pipelines: Use predefined variables ","excerpt":"Problem I have Azure devops pipeline to build docker image from source. I want the docker image have …","ref":"https://djangocas.dev/blog/azure/troubleshooting-azure-function-did-not-find-any-initialized-language-workers/","title":"Add git commit to docker image tag in Azure pipeline"},{"body":"I have an Azure devops pipeline and want to pass some data between different tasks. One way to do is use environment var.\n Variables give you a convenient way to get key bits of data into various parts of the pipeline. As the name suggests, the value of a variable may change from run to run or job to job of your pipeline. Almost any place where a pipeline requires a text string or a number, you can use a variable instead of hard-coding a value. The system will replace the variable with its current value during the pipeline\u0026rsquo;s execution.\n To access var, the syntax is $(varname), this can be used in Azure devops portal or yaml file.\nSet var across task To set var in Azure pipeline, need use task.setvariable in following format:\necho \u0026#34;##vso[task.setvariable variable=myvar]foo bar\u0026#34; Now in next Azure pipeline task, it use access var myvar through $(myvar).\nAvailable variables Azure have predefined variables here.\nI curious what variables available and the its value in Azure pipeline so I can better config pipeline use those variables,\nI create a Bash task use env command to log all the environment variables:\nOr config this new task through YAML file:\nsteps:- bash:|# Print all the available env vars. envdisplayName:envFor future reference, the following is the env output:\n##[section]Starting: env ================================================= Task : Bash Description : Run a Bash script on macOS, Linux, or Windows Version : 3.163.1 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash ============================================================================== Generating script. [command]\u0026quot;C:\\Program Files\\Git\\bin\\bash.exe\u0026quot; --noprofile --norc -c pwd ========================== Starting Command Output =========================== [command]\u0026quot;C:\\Program Files\\Git\\bin\\bash.exe\u0026quot; --noprofile --norc /d/a/_temp/a6edbca5-dde4-4b7d-adb3-cf0024c12046.sh USERDOMAIN=fv-az335 OS=Windows_NT COMMONPROGRAMFILES=C:\\Program Files\\Common Files AGENT_HOMEDIRECTORY=C:\\agents\\2.164.8 PROCESSOR_LEVEL=6 PSModulePath=C:\\Modules\\azurerm_2.1.0;C:\\Modules\\azure_2.1.0;C:\\Users\\packer\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\PowerShell\\Modules\\ RELEASE_ATTEMPTNUMBER=1 CommonProgramW6432=C:\\Program Files\\Common Files M2_HOME=C:\\ProgramData\\chocolatey\\lib\\maven\\apache-maven-3.6.2 REQUESTEDFORID=8df0411e-3c97-6c2e-96c8-c300f2612512 BOOST_ROOT=C:\\hostedtoolcache\\windows\\Boost\\1.69.0 RELEASE_DEFINITIONENVIRONMENTID=1 SYSTEM_STAGEDISPLAYNAME=Deploy To Dev SYSTEM_JOBATTEMPT=1 AGENT_VERSION=2.164.8 GOROOT_1_11_X64=C:\\Go1.11.12 ANDROID_HOME=C:\\Program Files (x86)\\Android\\android-sdk RELEASE_REQUESTEDFOREMAIL=Firstname_Lastname@example.com CommonProgramFiles(x86)=C:\\Program Files (x86)\\Common Files RELEASE_ARTIFACTS__FOO-PRODUCTION_BUILDNUMBER=develop-7513 JAVA_HOME_11_X64=C:\\Program Files\\Java\\zulu-11-azure-jdk_11.33.15-11.0.4-win_x64 SYSTEM_TEAMFOUNDATIONSERVERURI=https://vsrm.dev.azure.com/azx-awesome/ ImageVersion=20200130.1 AGENT_TOOLSDIRECTORY=C:/hostedtoolcache/windows INPUT_ARGUMENTS= SYSTEM_DEFINITIONID=1 AGENT_DISABLELOGPLUGIN_TESTFILEPUBLISHERPLUGIN=true RELEASE_DEPLOYMENTID=17 AGENT_WORKFOLDER=D:\\a RELEASE_RELEASEDESCRIPTION= AZURE_EXTENSION_DIR=C:\\Program Files\\Common Files\\AzureCliExtensionDirectory GOROOT_1_9_X64=C:\\Go1.9.7 PUBLIC=C:\\Users\\Public SYSTEM_DEFINITIONNAME=New release pipeline AGENT_TEMPDIRECTORY=D:\\a\\_temp BOOST_ROOT_1_72_0=C:\\hostedtoolcache\\windows\\Boost\\1.72.0 EXEPATH=C:\\Program Files\\Git\\bin RELEASE_ENVIRONMENTID=14 SYSTEM_PHASENAME=Phase_1 RELEASE_PRIMARYARTIFACTSOURCEALIAS=_FOO-production SYSTEM_JOBIDENTIFIER=Stage_81682fe045cf4f0289829127534b0b7c_1_1.Phase_1.__default USERNAME=VssAdministrator ChocolateyInstall=C:\\ProgramData\\chocolatey JAVA_HOME=C:\\Program Files\\Java\\zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64 MonAgentClientLocation=C:\\Packages\\Plugins\\Microsoft.Azure.Geneva.GenevaMonitoring\\2.16.0.1\\Monitoring\\Agent LOGONSERVER=\\\\fv-az335 PROCESSOR_ARCHITECTURE=AMD64 SYSTEM_JOBPARALLELISMTAG=Private M2=\\bin GeckoWebDriver=C:\\SeleniumWebDrivers\\GeckoDriver RELEASE_REASON=Manual RELEASE_ARTIFACTS__FOO-PRODUCTION_TYPE=AzureContainerRepository RELEASE_RELEASENAME=Release-14 LOCALAPPDATA=C:\\Users\\VssAdministrator\\AppData\\Local RELEASE_DEPLOYMENT_REQUESTEDFOR=Firstname Lastname M2_REPO=C:\\ProgramData\\m2 DEPLOY_SLOT=production COMPUTERNAME=fv-az335 RELEASE_DEPLOYMENT_REQUESTEDFORID=8cf0410e-3c97-6c21-96c8-c30042614512 AGENT_OS=Windows_NT SYSTEMDRIVE=C: USERPROFILE=C:\\Users\\VssAdministrator PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.FOO SYSTEMROOT=C:\\windows ENDPOINT_URL_SYSTEMVSSCONNECTION=https://vsrm.dev.azure.com/azx-awesome/ USERDOMAIN_ROAMINGPROFILE=fv-az335 RELEASE_REQUESTEDFOR=Firstname Lastname PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 79 Stepping 1, GenuineIntel SYSTEM_WORKFOLDER=D:\\a GRADLE_HOME=C:\\ProgramData\\chocolatey\\lib\\gradle\\tools\\gradle-6.0.1 AGENT_DISABLELOGPLUGIN_TESTRESULTLOGPLUGIN=true AGENT_ROOTDIRECTORY=D:\\a RELEASE_RELEASEURI=vstfs:///ReleaseManagement/Release/14 PWD=/d/a/r1/a MSMPI_BIN=C:\\Program Files\\Microsoft MPI\\Bin\\ HOME=/c/Users/VssAdministrator AGENT_ID=42 GOROOT=C:\\Go1.12.7 TMP=/tmp ANDROID_NDK_HOME=C:\\Microsoft\\AndroidNDK64\\android-ndk-r15c SYSTEM_TOTALJOBSINPHASE=1 RELEASE_ARTIFACTS__FOO-PRODUCTION_BUILDID=develop-7513 SYSTEM_COLLECTIONURI=https://vsrm.dev.azure.com/azx-awesome/ ChromeWebDriver=C:\\SeleniumWebDrivers\\ChromeDriver RUNNER_TOOLSDIRECTORY=C:/hostedtoolcache/windows JAVA_HOME_8_X64=C:\\Program Files\\Java\\zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64 AGENT_OSARCHITECTURE=X64 SYSTEM_CULTURE=en-US SYSTEM_TEAMPROJECTID=81682fe0-45ce-4f02-8982-9927534b0b7c RELEASE_ENVIRONMENTNAME=Deploy To Dev RELEASE_DEPLOYMENT_REQUESTEDFOREMAIL=Firstname_Lastname@example.com VSTS_AGENT_PERFLOG=c:\\vsts\\perflog CONDA=C:\\Miniconda IEWebDriver=C:\\SeleniumWebDrivers\\IEDriver BUILD_TYPE=AzureContainerRepository GOROOT_1_13_X64=C:\\Go1.13 BOOST_ROOT_1_69_0=C:\\hostedtoolcache\\windows\\Boost\\1.69.0 SYSTEM_JOBPOSITIONINPHASE=1 SYSTEM_JOBID=f1ed5861-42cf-5cea-8ff0-dab22962cff3 PHPROOT=c:\\tools\\php AGENT_JOBNAME=Run on agent SYSTEM_STAGEATTEMPT=1 SYSTEM_PIPELINESTARTTIME=2020-02-11 23:44:55+00:00 RELEASE_DEPLOYPHASEID=17 RELEASE_ENVIRONMENTS_DEPLOY_TO_DEV_STATUS=InProgress PROCESSOR_REVISION=4f01 RELEASE_ENVIRONMENTURI=vstfs:///ReleaseManagement/Environment/11 SYSTEM_TASKINSTANCENAME=Bash GOROOT_1_12_X64=C:\\Go1.12.7 NUMBER_OF_PROCESSORS=2 SYSTEM_PLANID=2a16d23a-e3d2-4a2e-97c4-b3f7af77a2b7 TASK_DISPLAYNAME=env ProgramW6432=C:\\Program Files SYSTEM_HOSTTYPE=release AGENT_SERVEROMDIRECTORY=C:\\agents\\2.164.8\\externals\\vstsom MSDEPLOY_HTTP_USER_AGENT=VSTS_a05a13d9-a33d-47dd-84c4-417f58390198_Release__14_14_1 TF_BUILD=True RELEASE_DEFINITIONNAME=New release pipeline AZURE_HTTP_USER_AGENT=VSTS_a05a13d9-a33d-47dd-84c4-417f58390198_Release__14_14_1 GOROOT_1_10_X64=C:\\Go1.10.8 SYSTEM_PHASEDISPLAYNAME=Run on agent COMSPEC=C:\\windows\\system32\\cmd.exe SYSTEM_TASKDEFINITIONSURI=https://dev.azure.com/azx-awesome/ APPDATA=C:\\Users\\VssAdministrator\\AppData\\Roaming TERM=cygwin SYSTEM_TASKDISPLAYNAME=env SYSTEM_STAGENAME=Stage_81682fe045ce4f0289829927534b0b7c_1_1 VSTS_PROCESS_LOOKUP_ID=vsts_0d3956ca-568b-4562-ae99-853674af7845 SYSTEM=release SYSTEM_PHASEATTEMPT=1 VCPKG_INSTALLATION_ROOT=C:\\vcpkg SYSTEM_JOBNAME=__default GCM_INTERACTIVE=Never RELEASE_ARTIFACTS__FOO-PRODUCTION_DEFINTIONID=foo-production BUILD_DEFINITIONID=foo-production SYSTEM_PHASEID=e09202ee-4c4c-51e7-8ae6-5ba2c80c73e2 AGENT_RELEASEDIRECTORY=D:\\a\\r1\\a WINDIR=C:\\windows AGENT_MACHINENAME=fv-az335 RELEASE_REQUESTEDFORID=8cf0410e-3c97-6c21-96c8-c30042614512 agent.jobstatus=Succeeded COBERTURA_HOME=C:\\cobertura-2.1.1 BUILD_DEFINTIONID=foo-production JAVA_HOME_7_X64=C:\\Program Files\\Java\\zulu-7-azure-jdk_7.31.0.5-7.0.232-win_x64 BUILD_DEFINITIONNAME=foo-production ANDROID_NDK_PATH=C:\\Microsoft\\AndroidNDK64\\android-ndk-r15c SYSTEM_ARTIFACTSDIRECTORY=D:\\a\\r1\\a ProgramData=C:\\ProgramData SHLVL=1 PLINK_PROTOCOL=ssh NPM_CONFIG_CACHE=C:\\npm\\cache PROGRAMFILES=C:\\Program Files AGENT_NAME=Hosted Agent BUILD_BUILDNUMBER=develop-7513 ALLUSERSPROFILE=C:\\ProgramData TEMP=/tmp SYSTEM_JOBDISPLAYNAME=Run on agent MAVEN_OPTS=-Xms256m SYSTEM_SERVERTYPE=Hosted SYSTEM_TIMELINEID=3a46d23a-e3d8-4a2e-97c4-b3f7ae77a5c8 RELEASE_TRIGGERINGARTIFACT_ALIAS= AGENT_RETAINDEFAULTENCODING=false MSYSTEM=MINGW64 SYSTEM_TASKINSTANCEID=16eb2309-ff06-5080-cfa3-e946532acdc5 SYSTEM_DEFAULTWORKINGDIRECTORY=D:\\a\\r1\\a AGENT_JOBSTATUS=Succeeded SBT_HOME=C:\\Program Files (x86)\\sbt\\ ANT_HOME=C:\\ProgramData\\chocolatey\\lib\\ant\\apache-ant-1.10.5 SYSTEM_TEAMPROJECT=MobileSecurityCore ProgramFiles(x86)=C:\\Program Files (x86) PATH=/mingw64/bin:/usr/bin:/c/Users/VssAdministrator/bin:/c/hostedtoolcache/windows/Python/3.6.8/x64:/c/hostedtoolcache/windows/Python/3.6.8/x64/Scripts:/c/Program Files/Mercurial:/c/ProgramData/kind:/c/vcpkg:/c/cf-cli:/c/Program Files (x86)/NSIS:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/Boost/1.69.0:/c/Program Files/dotnet:/c/mysql-5.7.21-winx64/bin:/c/Program Files/Java/zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64/bin:/c/Program Files (x86)/sbt/bin:/c/Rust/.cargo/bin:/c/hostedtoolcache/windows/Ruby/2.5.7/x64/bin:/c/Go1.12.7/bin:/bin:/c/hostedtoolcache/windows/Python/3.6.8/x64/Scripts:/c/hostedtoolcache/windows/Python/3.6.8/x64:/c/npm/prefix:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/Program Files/Microsoft MPI/Bin:/c/windows/system32:/c/windows:/c/windows/System32/Wbem:/c/windows/System32/WindowsPowerShell/v1.0:/c/ProgramData/Chocolatey/bin:/c/Program Files/Docker:/c/Program Files/PowerShell/6:/c/Program Files/dotnet:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/150/DTS/Binn:/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/cmd:/mingw64/bin:/usr/bin:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/Subversion/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.2/bin:/c/Program Files/CMake/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/Program Files/OpenSSL/bin:/c/Users/VssAdministrator/.dotnet/tools:/c/Program NPM_CONFIG_PREFIX=C:\\npm\\prefix RELEASE_ARTIFACTS__FOO-PRODUCTION_DEFINITIONID=foo-production WIX=C:\\Program Files (x86)\\WiX Toolset v3.11\\ SELENIUM_JAR_PATH=C:\\selenium\\selenium-server-standalone.jar HOMEDRIVE=C: SYSTEM_COLLECTIONID=a05a13d9-a33d-47dd-84c4-417f58390098 SYSTEM_TEAMFOUNDATIONCOLLECTIONURI=https://dev.azure.com/azx-awesome/ HOMEPATH=\\Users\\VssAdministrator RELEASE_DEFINITIONID=1 RELEASE_SKIPARTIFACTSDOWNLOAD=False GIT_TERMINAL_PROMPT=0 RELEASE_RELEASEID=14 RELEASE_ARTIFACTS__FOO-PRODUCTION_DEFINITIONNAME=foo-production SYSTEM_STAGEID=95cbcc97-ca20-5423-1f2a-c4d17b4f963c SYSTEM_ENABLEACCESSTOKEN=False BUILD_BUILDID=develop-7513 RELEASE_DEPLOYMENT_STARTTIME=2020-02-11 23:44:46Z RELEASE_RELEASEWEBURL=https://dev.azure.com/azx-awesome/a1682fe0-45ce-4f02-8982-d927534b0b8c/_release?releaseId=14\u0026amp;_a=release-summary VS140COMNTOOLS=C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\ PYTHON_HOME=C:/hostedtoolcache/windows\\Python\\3.6.8\\x64 _=/usr/bin/env ##[section]Finishing: env Reference Azure pipelines: Define variables Azure pipelines: Use predefined variables ","excerpt":"I have an Azure devops pipeline and want to pass some data between different tasks. One way to do is …","ref":"https://djangocas.dev/blog/azure/pass-variable-in-azure-devops-pipelines/","title":"Pass variable in Azure devops pipelines"},{"body":"WALinuxAgent is Microsoft Azure Linux Agent with root access (backdoor?). It is pretty powerful to manage Linux on Azure. The source code is host at github Azure/WALinuxAgent .\n The Microsoft Azure Linux Agent (waagent) manages Linux provisioning and VM interaction with the Azure Fabric Controller. It provides the following functionality for Linux IaaS deployments:\n Image Provisioning\n Creation of a user account Configuring SSH authentication types Deployment of SSH public keys and key pairs Setting the host name Publishing the host name to the platform DNS Reporting SSH host key fingerprint to the platform Resource Disk Management Formatting and mounting the resource disk Configuring swap space Networking\n Manages routes to improve compatibility with platform DHCP servers Ensures the stability of the network interface name Kernel\n Configure virtual NUMA (disable for kernel \u0026lt;2.6.37) Consume Hyper-V entropy for /dev/random Configure SCSI timeouts for the root device (which could be remote) Diagnostics\n Console redirection to the serial port SCVMM Deployments\n Detect and bootstrap the VMM agent for Linux when running in a System Center Virtual Machine Manager 2012R2 environment VM Extension\n Inject component authored by Microsoft and Partners into Linux VM (IaaS) to enable software and configuration automation VM Extension reference implementation on GitHub With walinuxagent, in Azure portal you can use execute command with root permission. You can also reset ssh login info etc.\nIf you do not want to Azure to control your VM, you should disable walinuxagent or remove it.\nTo check the current walinuxagent service status on Debian buster\n$ systemctl list-unit-files | grep agent waagent-apt.service enabled waagent-provision.service static waagent-resourcedisk.service static walinuxagent.service enabled To stop and disable walinuxagent service:\n$ sudo systemctl stop walinuxagent $ sudo systemctl disable walinuxagent Synchronizing state of walinuxagent.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install disable walinuxagent insserv: warning: current start runlevel(s) (empty) of script `walinuxagent\u0026#39; overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `walinuxagent\u0026#39; overrides LSB defaults (0 1 6). Removed /etc/systemd/system/multi-user.target.wants/walinuxagent.service. To query list the agent on Debian buster:\n$ sudo dpkg -l|grep waagent ii waagent 2.2.34-4 all Windows Azure Linux Agent To remove it on Debian:\n$ sudo apt-get purge waagent -y $ sudo apt-get autoremove -y References Azure/WALinuxAgent source code on github ","excerpt":"WALinuxAgent is Microsoft Azure Linux Agent with root access (backdoor?). It is pretty powerful to …","ref":"https://djangocas.dev/blog/azure/azure-walinuxagent-backdoor/","title":"Azure WALinuxAgent Backdoor"},{"body":"python-cas is Python CAS (Central Authentication Server) client library support CAS 1.0/2.0/3.0. It was initially split from django-cas-ng to support any Python app to easily implement a CAS client.\nThis post is an example project to demo how to integrate python-cas into a Flask app. This should give you idea how to integrate python-cas into any other Python app.\nIf you are new to CAS, to get started about CAS, please checkout CAS 101 .\nFlask Example Project I created a Flask project and integrated python-cas to support CAS login/logout, The integration is pretty straightforward, the key point is Flask need call some CAS API list below:\n CASClient.get_login_url() CASClient.verify_ticket() CASClient.get_logout_url() Design /login /login to handle client login request and redirect to next after login successfully.\nAccept query parameters:\n next: string. The redirect URL after login successfully. e.g. %2Fprofile. NOTE: Need URL encoded. ticket: string. CAS service ticket. When CAS authenticated success, it will have this parameter in callback. e.g. ST-1580754576-qbgmySJHjm. After login to CAS successfully, set create a session to local Flask app to save login state. The session var is username.\n/logout and /logout_callback /logout will send logout request to CAS server to logout from CAS server, after CAS logged out user, CAS will redirect to /logout_callback, it will logged user out from Flask app locally by delete session.\n/profile /profile show logged user info. e.g. username.\nSequence Diagram CAS login / logout flow sequence diagram as below:\nCode The code is pretty simple, less than 50 lines of code. All the hard work is done by python-cas.\n$ cloc app.py -------------------------------------------------------------- Language files blank comment code -------------------------------------------------------------- Python 1 18 0 47 -------------------------------------------------------------- The source code as below, it is self explained:\nfrom flask import Flask, request, session, redirect, url_for from cas import CASClient app = Flask(__name__) app.secret_key = \u0026#39;V7nlCN90LPHOTA9PGGyf\u0026#39; cas_client = CASClient( version=3, service_url=\u0026#39;http://localhost:5000/login?next=%2Fprofile\u0026#39;, server_url=\u0026#39;https://django-cas-ng-demo-server.herokuapp.com/cas/\u0026#39; ) @app.route(\u0026#39;/\u0026#39;) def index(): return redirect(url_for(\u0026#39;login\u0026#39;)) @app.route(\u0026#39;/profile\u0026#39;) def profile(method=[\u0026#39;GET\u0026#39;]): if \u0026#39;username\u0026#39; in session: return \u0026#39;Logged in as %s. \u0026lt;a href=\u0026#34;/logout\u0026#34;\u0026gt;Logout\u0026lt;/a\u0026gt;\u0026#39; % session[\u0026#39;username\u0026#39;] return \u0026#39;Login required. \u0026lt;a href=\u0026#34;/login\u0026#34;\u0026gt;Login\u0026lt;/a\u0026gt;\u0026#39;, 403 @app.route(\u0026#39;/login\u0026#39;) def login(): if \u0026#39;username\u0026#39; in session: # Already logged in return redirect(url_for(\u0026#39;profile\u0026#39;)) next = request.args.get(\u0026#39;next\u0026#39;) ticket = request.args.get(\u0026#39;ticket\u0026#39;) if not ticket: # No ticket, the request come from end user, send to CAS login cas_login_url = cas_client.get_login_url() app.logger.debug(\u0026#39;CAS login URL: %s\u0026#39;, cas_login_url) return redirect(cas_login_url) # There is a ticket, the request come from CAS as callback. # need call `verify_ticket()` to validate ticket and get user profile. app.logger.debug(\u0026#39;ticket: %s\u0026#39;, ticket) app.logger.debug(\u0026#39;next: %s\u0026#39;, next) user, attributes, pgtiou = cas_client.verify_ticket(ticket) app.logger.debug( \u0026#39;CAS verify ticket response: user: %s, attributes: %s, pgtiou: %s\u0026#39;, user, attributes, pgtiou) if not user: return \u0026#39;Failed to verify ticket. \u0026lt;a href=\u0026#34;/login\u0026#34;\u0026gt;Login\u0026lt;/a\u0026gt;\u0026#39; else: # Login successfully, redirect according `next` query parameter. session[\u0026#39;username\u0026#39;] = user return redirect(next) @app.route(\u0026#39;/logout\u0026#39;) def logout(): redirect_url = url_for(\u0026#39;logout_callback\u0026#39;, _external=True) cas_logout_url = cas_client.get_logout_url(redirect_url) app.logger.debug(\u0026#39;CAS logout URL: %s\u0026#39;, cas_logout_url) return redirect(cas_logout_url) @app.route(\u0026#39;/logout_callback\u0026#39;) def logout_callback(): # redirect from CAS logout request after CAS logout successfully session.pop(\u0026#39;username\u0026#39;, None) return \u0026#39;Logged out from CAS. \u0026lt;a href=\u0026#34;/login\u0026#34;\u0026gt;Login\u0026lt;/a\u0026gt;\u0026#39; You can clone it from https://github.com/python-cas/flask-example/ Run your local server:\n$ git clone git@github.com:python-cas/flask-example.git python-cas-flask-example $ cd python-cas-flask-example $ pip install -r requirements.txt $ sh run_debug_server.sh * Serving Flask app \u0026#34;app.py\u0026#34; (lazy loading) * Environment: development * Debug mode: on * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) You may curious the actual CAS flow, Here is the debug for reference, you can get more insight about how CAS redirect and ticket validation.\n# Login \u0026#34;GET /login HTTP/1.1\u0026#34; 302 - DEBUG in app: CAS login URL: https://django-cas-ng-demo-server.herokuapp.com/cas/login?service=http%3A%2F%2Flocalhost%3A5000%2Flogin%3Fnext%3D%252Fprofile \u0026#34;GET /login HTTP/1.1\u0026#34; 302 - DEBUG in app: ticket: ST-1580754576-qbgmySJHjmvdeFjy4ZGwkA1IwxGcZxL4 DEBUG in app: next: /profile DEBUG in app: user: admin, attributes: {}, pgtiou: None \u0026#34;GET /login?next=%2Fprofile\u0026amp;ticket=ST-1580754576-qbgmySJHjmvdeFjy4ZGwkA1IwxGcZxL4 HTTP/1.1\u0026#34; 302 - \u0026#34;GET /profile HTTP/1.1\u0026#34; 200 - # Logout DEBUG in app: CAS logout URL: https://django-cas-ng-demo-server.herokuapp.com/cas/logout?service=http%3A%2F%2Flocalhost%3A5000%2Flogout_callback \u0026#34;GET /logout HTTP/1.1\u0026#34; 302 - \u0026#34;GET /logout_callback HTTP/1.1\u0026#34; 200 - Live Demo If you want to see a live demo, you can click here. The following username/password can be used to login in demo server.\nusername:adminpassword:django-cas-ngReference CAS 101 python-cas project python-cas/flask-example project source code Flask example live demo ","excerpt":"python-cas is Python CAS (Central Authentication Server) client library support CAS 1.0/2.0/3.0. It …","ref":"https://djangocas.dev/blog/python-cas-flask-example/","title":"python-cas Flask Example"},{"body":"django-cas-ng is Django CAS (Central Authentication Service) 1.0/2.0/3.0 client library to support SSO (Single Sign On) and SLO (Single Logout)!\nTo demo how easy to integrate with django-cas-ng, here is an example project to show how to use django-cas-ng to work with CAS login/logout.\nThe CAS login flow outline as below. The App Service here is refer to this demo project.\nExample Project Here is steps to create this example project:\nCreate a django project and install django-cas-ng $ django-admin startproject mysite $ cd mysite $ pip install django-cas-ng Collecting django-cas-ng Using cached https://files.pythonhosted.org/packages/a1/9d/014a146bdab0bd1cdba8f09c2a15ffeddd26604b3b894bcd702c5f6a68cd/django_cas_ng-4.0.1-py2.py3-none-any.whl ... ... ... Installing collected packages: django-cas-ng Successfully installed django-cas-ng-4.0.1 $ pip freeze | grep django-cas-ng \u0026gt;\u0026gt; requirements.txt Config django-cas-ng mysite/settings.py Config INSTALLED_APPS: Add django_cas_ng to INSTALLED_APPS:\nINSTALLED_APPS = [ \u0026#39;django.contrib.admin\u0026#39;, \u0026#39;django.contrib.auth\u0026#39;, \u0026#39;django.contrib.contenttypes\u0026#39;, \u0026#39;django.contrib.sessions\u0026#39;, \u0026#39;django.contrib.messages\u0026#39;, \u0026#39;django.contrib.staticfiles\u0026#39;, \u0026#39;django_cas_ng\u0026#39; ] Config MIDDLEWARE: Add django_cas_ng.middleware.CASMiddleware to MIDDLEWARE:\nMIDDLEWARE = [ \u0026#39;django.middleware.security.SecurityMiddleware\u0026#39;, \u0026#39;django.contrib.sessions.middleware.SessionMiddleware\u0026#39;, \u0026#39;django.middleware.common.CommonMiddleware\u0026#39;, \u0026#39;django.middleware.csrf.CsrfViewMiddleware\u0026#39;, \u0026#39;django.contrib.auth.middleware.AuthenticationMiddleware\u0026#39;, \u0026#39;django.contrib.messages.middleware.MessageMiddleware\u0026#39;, \u0026#39;django.middleware.clickjacking.XFrameOptionsMiddleware\u0026#39;, \u0026#39;django_cas_ng.middleware.CASMiddleware\u0026#39; ] Config AUTHENTICATION_BACKENDS: Add django_cas_ng.backends.CASBackend to AUTHENTICATION_BACKENDS:\nAUTHENTICATION_BACKENDS = ( \u0026#39;django.contrib.auth.backends.ModelBackend\u0026#39;, \u0026#39;django_cas_ng.backends.CASBackend\u0026#39;, ) Config CAS server URL and CAS protocol version: To make this example project work, I created a demo CAS server host on Heroku. The server URL is https://django-cas-ng-demo-server.herokuapp.com/cas/\nCAS_SERVER_URL = \u0026#39;https://django-cas-ng-demo-server.herokuapp.com/cas/\u0026#39; CAS_VERSION = \u0026#39;3\u0026#39; mysite/urls.py Add accounts/login and accounts/logout URL. To demo the login/logout, I also add a simple home page to show login/logout, the view is view.index.\nfrom django.contrib import admin from django.urls import path import django_cas_ng.views from . import views urlpatterns = [ path(\u0026#39;\u0026#39;, views.index, name=\u0026#39;index\u0026#39;), path(\u0026#39;admin/\u0026#39;, admin.site.urls), path(\u0026#39;accounts/login\u0026#39;, django_cas_ng.views.LoginView.as_view(), name=\u0026#39;cas_ng_login\u0026#39;), path(\u0026#39;accounts/logout\u0026#39;, django_cas_ng.views.LogoutView.as_view(), name=\u0026#39;cas_ng_logout\u0026#39;), ] mysite/views.py Create a new file named mysite/views.py and implement index method.\nThe demo view will check user is authenticated by using request.user.is_authenticated. If it is authenticated, it will get logged user name from request.user.username\nfrom django.http import HttpResponse def index(request): if request.user.is_authenticated: return HttpResponse(\u0026#39;\u0026lt;p\u0026gt;Welcome to \u0026lt;a href=\u0026#34;https://djangocas.dev\u0026#34;\u0026gt;django-cas-ng\u0026lt;/a\u0026gt;.\u0026lt;/p\u0026gt;\u0026lt;p\u0026gt;You logged in as \u0026lt;strong\u0026gt;%s\u0026lt;/strong\u0026gt;.\u0026lt;/p\u0026gt;\u0026lt;p\u0026gt;\u0026lt;a href=\u0026#34;/accounts/logout\u0026#34;\u0026gt;Logout\u0026lt;/a\u0026gt;\u0026lt;/p\u0026gt;\u0026#39; % request.user) else: return HttpResponse(\u0026#39;\u0026lt;p\u0026gt;Welcome to \u0026lt;a href=\u0026#34;https://djangocas.dev\u0026#34;\u0026gt;django-cas-ng\u0026lt;/a\u0026gt;.\u0026lt;/p\u0026gt;\u0026lt;p\u0026gt;\u0026lt;a href=\u0026#34;/accounts/login\u0026#34;\u0026gt;Login\u0026lt;/a\u0026gt;\u0026lt;/p\u0026gt;\u0026#39;) Generate database tables $ python manage.py migrate Operations to perform: Apply all migrations: admin, auth, contenttypes, django_cas_ng, sessions Running migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK Applying admin.0001_initial... OK Applying admin.0002_logentry_remove_auto_add... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0005_alter_user_last_login_null... OK Applying auth.0006_require_contenttypes_0002... OK Applying auth.0007_alter_validators_add_error_messages... OK Applying auth.0008_alter_user_username_max_length... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying django_cas_ng.0001_initial... OK Applying sessions.0001_initial... OK You can also get the entire project source code at django-cas-ng/example . The main change is commit 4dea11de05 .\nRun test server $ python manage.py runserver Performing system checks... ... ... Django version 3.0.2, using settings \u0026#39;mysite.settings\u0026#39; Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. To play to this demo project, you can simply run following commands to clone the code and run your local server instance:\ngit clone https://github.com/django-cas-ng/example cd example pip install -r requirements.txt python manage.py runserver Live Demo If you want to see a live demo, you can click here. The following username/password can be used to login in demo server.\nusername:adminpassword:django-cas-ngDemo CAS Server To make the entire flow work, I also created a demo CAS server to work with this example project, open source at demo-cas-server .\nReference CAS 101 django-cas-ng example project source code ","excerpt":"django-cas-ng is Django CAS (Central Authentication Service) 1.0/2.0/3.0 client library to support …","ref":"https://djangocas.dev/blog/django-cas-ng-example-project/","title":"django-cas-ng Example Project"},{"body":"Here is a comparison of some exist Django CAS clients: django-cas-ng, django-cas-client and django-cas.\nNote: Data is fetched in real time and alway up to date.\n django-cas-ng django-cas-client django-cas Homepage License Stars NA Forks NA Watchers NA Contributors NA Last commit 2013-04-01 Latest release Latest release date Release count // function getLastCommitDate(selector, owner, repo, branch) { // $.get(`https://api.github.com/repos/${owner}/${repo}/branches/${branch}`) // .then((body) = { // $(selector).text(body.commit.commit.author.date); // }).catch((err) = { // console.error(err.responseText || err); // }); // } function getLastPypiInfo(repo, versionSelector, releaseDateSelector, releaseCountSelector, licenseSelector, homepageSelector) { $.get(`https://pypi.org/pypi/${repo}/json`) .then((body) = { $(versionSelector).text(body.info.version); $(licenseSelector).text(body.info.license); $(homepageSelector).text(body.info.home_page); $(releaseDateSelector).text(body.urls[0].upload_time); $(releaseCountSelector).text(Object.keys(body.releases).length); }).catch((err) = { console.error(err.responseText || err); }); } // getLastCommitDate('#django-cas-ng-last-commit-date', 'django-cas-ng', 'django-cas-ng', 'master'); // getLastCommitDate('#django-cas-client-last-commit-date', 'kstateome', 'django-cas', 'master'); getLastPypiInfo('django-cas-ng', '#django-cas-ng-latest-release', '#django-cas-ng-latest-release-date', '#django-cas-ng-latest-release-count', '#django-cas-ng-license', '#django-cas-ng-homepage'); getLastPypiInfo('django-cas-client', '#django-cas-client-latest-release', '#django-cas-client-latest-release-date', '#django-cas-client-latest-release-count', '#django-cas-client-license', '#django-cas-client-homepage'); getLastPypiInfo('django-cas', '#django-cas-latest-release', '#django-cas-latest-release-date', '#django-cas-latest-release-count', '#django-cas-license', '#django-cas-homepage'); ","excerpt":"Here is a comparison of some exist Django CAS clients: django-cas-ng, django-cas-client and …","ref":"https://djangocas.dev/blog/cas/django-cas-clients-comparison/","title":"A comparison of django cas clients"},{"body":"Sphinx is a documentation generator that makes it easy to create intelligent and beautiful documentation.\nSphinx was originally created for the Python documentation, then it extend to support many other languages. It use reStructuredText format to write document.\nIf you are first time hearing reStructuredText, checkout reStructuredText Primer As an example, checkout django-cas-ng document which is generated by sphinx-doc.\nFeatures Support multiple output formats: HTML, LaTeX, pdf, ePub, Texinfo, manual pages, plain text. Extensive cross-references: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children Automatic indices: general index as well as a language-specific module indices Code handling: automatic highlighting using the Pygments highlighter Extensions: automatic testing of code snippets, inclusion of docstrings from Python modules (API docs), and more Extendable: more than 50 extensions contributed by users in a second repository; most of them installable from PyPI Quick start Install $ pip install Sphinx First project $ mkdir docs $ cd docs $ sphinx-quickstart Welcome to the Sphinx 2.3.1 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Selected root path: . You have two options for placing the build directory for Sphinx output. Either, you use a directory \u0026#34;_build\u0026#34; within the root path, or you separate \u0026#34;source\u0026#34; and \u0026#34;build\u0026#34; directories within the root path. \u0026gt; Separate source and build directories (y/n) [n]: The project name will occur in several places in the built documentation. \u0026gt; Project name: My Awesome Project \u0026gt; Author name(s): Your name \u0026gt; Project release []: 1.0.0 If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language. \u0026gt; Project language [en]: Creating file ./conf.py. Creating file ./index.rst. File ./Makefile already exists, skipping. Creating file ./make.bat. Finished: An initial directory structure has been created. You should now populate your master file ./index.rst and create other documentation source files. Use the Makefile to build the docs, like so: make builder where \u0026#34;builder\u0026#34; is one of the supported builders, e.g. html, latex or linkcheck. Generate document Generate html, the output directory is _build/html:\n$ make html Running Sphinx v2.3.1 making output directory... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 3 source files that are out of date ... ... The HTML pages are in _build/html. Generate pdf, the output directory is _build/latex:\n$ make latexpdf ... ... Output written on anawesomeproject.pdf (5 pages, 39374 bytes). Transcript written on anawesomeproject.log. === TeX engine is \u0026#39;pdfTeX\u0026#39; Latexmk: Index file \u0026#39;anawesomeproject.idx\u0026#39; was written Latexmk: Log file says output to \u0026#39;anawesomeproject.pdf\u0026#39; Latexmk: All targets () are up-to-date Extensions Since many projects will need special features in their documentation, Sphinx allows adding “extensions” to the build process, each of which can modify almost any aspect of document processing. You can even build your own extension.\nSphinx have many extensions.\nFor python project, you may interested in following extensions:\nsphinx.ext.autodoc - Generate Python Module API Documentation autodoc can import the modules you are documenting, and pull in documentation from docstrings in a semi-automatic way.\nYou can use autodoc extension to generate Python module API documentation.\nFirst you need add sphinx.ext.autodoc to extensions in conf.py:\nextensions = [ # ... \u0026#39;sphinx.ext.autodoc\u0026#39;, # Pull in documentation from docstrings ] Then you can use sphinx-apidoc to automatically Python module API document.\n$ sphinx-apidoc -h usage: sphinx-apidoc [OPTIONS] -o \u0026lt;OUTPUT_PATH\u0026gt; \u0026lt;MODULE_PATH\u0026gt; [EXCLUDE_PATTERN, ...] Look recursively in \u0026lt;MODULE_PATH\u0026gt; for Python modules and packages and create one reST file with automodule directives per package in the \u0026lt;OUTPUT_PATH\u0026gt;. The \u0026lt;EXCLUDE_PATTERN\u0026gt;s can be file and/or directory patterns that will be excluded from generation. Note: By default this script will not overwrite already created files. $ sphinx-apidoc -o api ../cas Creating file api/cas.rst. Creating file api/modules.rst. Example of api/modules.rst:\ncas === .. toctree:: :maxdepth: 4 casExample of api/cas.rst:\ncas package =========== Submodules ---------- cas.cas module -------------- .. automodule:: cas.cas :members: :undoc-members: :show-inheritance: Module contents --------------- .. automodule:: cas :members: :undoc-members: :show-inheritance: sphinx.ext.napoleon - – Support for NumPy and Google style docstrings napoleon allow you write api documentation in Google python style docstrings.\nFor example, instead of\n:param path: The path of the file to wrap:type path: str:param field_storage: The :class:`FileStorage` instance to wrap:type field_storage: FileStorage:param temporary: Whether or not to delete the file when the File instance is destructed:type temporary: bool:returns: A buffered writable file descriptor:rtype: BufferedFileStorageYou can write it i Google style:\nArgs: path (str): The path of the file to wrap field_storage (FileStorage): The :class:`FileStorage` instance to wrap temporary (bool): Whether or not to delete the file when the File instance is destructed Returns: BufferedFileStorage: A buffered writable file descriptor Checkout Google Style Python Docstring Example .\nsphinx.ext.viewcode - Add links to highlighted source code viewcode looks at your Python object descriptions (.. class::, .. function:: etc.) and tries to find the source files where the objects are contained. When found, a separate HTML page will be output for each module with a highlighted version of the source code, and a link will be added to all object descriptions that leads to the source code of the described object. A link back from the source to the description will also be inserted.\nThis is helpful in your documentation, you can cross reference to source code.\nsphinx_sitemap sphinx_sitemap is a third party extension can be used to generate a sitemap.xml. You need install it by:\n$ pip install sphinx_sitemap m2r - Markdown to reStructuredText m2r is a third party extension to convert Markdown to reStructuredText. You need install it by:\n$ pip install m2r Then you can add .md files to your sphinx-doc project.\nTroubleshooting WARNING: html_static_path entry \u0026lsquo;_static\u0026rsquo; does not exist When run make html, it report following warning:\nWARNING: html_static_path entry '_static' does not exist This is due to in conf.py, html_static_path have entry value _static, this is default setting.\nTo remove the warnings, try setting html_static_path = [] in your conf.py or create a empty _static directory.\nWARNING: autodoc: failed to import class \u0026lsquo;xxxx\u0026rsquo; If you use autodoc for Python api in Django module, you may When run into autodoc failed to import class error when you run make html. For example:\n$ make html ... ... WARNING: autodoc: failed to import class \u0026#39;backends.CASBackend\u0026#39; from module \u0026#39;django_cas_ng\u0026#39;; the following exception was raised: Traceback (most recent call last): File \u0026#34;devenv/py3/lib/python3.7/site-packages/sphinx/ext/autodoc/importer.py\u0026#34;, line 32, in import_module return importlib.import_module(modname) File \u0026#34;/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py\u0026#34;, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File \u0026#34;\u0026lt;frozen importlib._bootstrap\u0026gt;\u0026#34;, line 1006, in _gcd_import File \u0026#34;\u0026lt;frozen importlib._bootstrap\u0026gt;\u0026#34;, line 983, in _find_and_load File \u0026#34;\u0026lt;frozen importlib._bootstrap\u0026gt;\u0026#34;, line 967, in _find_and_load_unlocked File \u0026#34;\u0026lt;frozen importlib._bootstrap\u0026gt;\u0026#34;, line 677, in _load_unlocked File \u0026#34;\u0026lt;frozen importlib._bootstrap_external\u0026gt;\u0026#34;, line 728, in exec_module File \u0026#34;\u0026lt;frozen importlib._bootstrap\u0026gt;\u0026#34;, line 219, in _call_with_frames_removed File \u0026#34;devenv/py3/lib/python3.7/site-packages/django_cas_ng/__init__.py\u0026#34;, line 37, in \u0026lt;module\u0026gt; getattr(settings, key) File \u0026#34;devenv/py3/lib/python3.7/site-packages/django/conf/__init__.py\u0026#34;, line 76, in __getattr__ self._setup(name) File \u0026#34;devenv/py3/lib/python3.7/site-packages/django/conf/__init__.py\u0026#34;, line 61, in _setup % (desc, ENVIRONMENT_VARIABLE)) django.core.exceptions.ImproperlyConfigured: Requested setting CAS_ADMIN_PREFIX, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. To fix this issue, you need add your module to syspath and have a dummy django config. You need add some python code in your conf.py. For example:\nimport os import sys import django from django.conf import settings sys.path.insert(0, os.path.abspath(\u0026#39;../\u0026#39;)) sys.path.insert(0, os.path.abspath(\u0026#39;../tests\u0026#39;)) settings.configure( SECRET_KEY=\u0026#39;something to make Django happy\u0026#39;, INSTALLED_APPS=[ \u0026#39;django.contrib.auth\u0026#39;, \u0026#39;django.contrib.contenttypes\u0026#39;, \u0026#39;django_cas_ng\u0026#39; ]) django.setup() References Sphinx home Sphinx Extensions Sphinx Extensions napoleon reStructuredText Primer Google Style Python Docstring Example ","excerpt":"Sphinx is a documentation generator that makes it easy to create intelligent and beautiful …","ref":"https://djangocas.dev/blog/sphinx-doc-101-introduction-to-sphinx-doc/","title":"Sphinx-doc 101: Introduction to Sphinx-doc"},{"body":"The difference between a forward proxy server and a reverse proxy server A common question is what\u0026rsquo;s the difference between a proxy server and a reverse proxy server?\nAn ordinary forward proxy is an intermediate server that sits between the client and the origin server. In order to get content from the origin server, the client sends a request to the proxy naming the origin server as the target. The proxy then requests the content from the origin server and returns it to the client. The client must be specially configured to use the forward proxy to access other sites.\nA typical usage of a forward proxy is to provide Internet access to internal clients that are otherwise restricted by a firewall. The forward proxy can also use caching to reduce network usage.\nA reverse proxy (or gateway), by contrast, appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the namespace of the reverse proxy. The reverse proxy then decides where to send those requests and returns the content as if it were itself the origin.\nA typical usage of a reverse proxy is to provide Internet users access to a server that is behind a firewall. Reverse proxies can also be used to balance load among several back-end servers or to provide caching for a slower back-end server. In addition, reverse proxies can be used simply to bring several servers into the same URL space.\nTest Configuration File Syntax After making change to nginx configuration file nginx.conf and any included configuration files like site specific configuration, It is useful to use nginx -t to test configuration syntax and validation before apply it.\n$ nginx -t nginx: [alert] could not open error log file: open() \u0026#34;/var/log/nginx/error.log\u0026#34; failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed You may need sudo:\n$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful Another useful parameter is -T which will test configuration and dump it to console.\n$ sudo nginx -T nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful # configuration file /etc/nginx/nginx.conf: user www-data; worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ... ... ... Reload NGINX without restart server Use -s parameter you can send signal to NGINX process. When you changed configuration file, you can send reload to reload server without restart server.\n$ sudo nginx -s reload All available signals: stop, quit, reopen, reload\n-s signal: send signal to a master process: stop, quit, reopen, reload Turn off server signature Want to hide Nginx version in error page.\nInstead of show nginx/1.16.2, only show nginx.\nHTTP response header also hide nginx version:\n$ curl -I localhost:80HTTP/1.1 200 OKServer:nginx...Solution In ubuntu install nginx-extras:\n$ sudo apt-get install nginx-extras -y Go to /etc/nginx/nginx.conf and under http add:\nhttp { more_set_headers \u0026#34;Server: foo\u0026#34;; server_tokens off; } Reload nginx\n$ sudo service nginx reload Add suffix / or not You can change proxied URL path, for example when NGINX received an incoming request with path /jenkins/job/, you can forward as /job/ to original server. Beware add or not add suffix slash (/) during config proxy_pass.\nserver { listen 2020 location /some/path { proxy_pass http://127.0.0.1:3000; } } With this config, http://127.0.0.1:2020/some/path/foo/bar will be rewrote as http://127.0.0.1:3000/some/path/foo/bar in original server.\nserver { listen 2020 location /some/path { proxy_pass http://127.0.0.1:3000/another; } } With this config, http://127.0.0.1:2020/some/path/foo/bar will be rewrote as http://127.0.0.1:3000/another/foo/bar in original server.\nserver { listen 2020 location /some/path/ { proxy_pass http://127.0.0.1:3000/another; } } With this config, http://127.0.0.1:2020/some/path/foo/bar will be rewrote as http://127.0.0.1:3000/anotherfoo/bar in original server.\nNOTE: There is no / after /another.\nserver { listen 2020 location /some/path/ { proxy_pass http://127.0.0.1:3000/another/; } } With this config, http://127.0.0.1:2020/some/path/foo/bar will be rewrote as http://127.0.0.1:3000/some/path/foo/bar in original server.\nKeep-alive not working with proxy_pass Symptom proxy_pass does not support keep-alive event server response Connection: keep-alive header like below:\nHTTP/1.1 200 OK Accept-Ranges: bytes Content-Length: 31746 Content-Type: text/html; charset=utf-8 Connection: keep-alive Date: Wed, 05 Feb 2020 21:32:51 GMT Try to add following Connection: keep-alive in proxy also does not work:\nproxy_set_header Connection \u0026#34;keep-alive\u0026#34; Root Cause keep-alive should enable in upstream block, not direct proxy_pass .\nKeep-alive also require proxy use http version 1.1.\nSolution Use upstream instead of direct proxy_pass. use http version 1.1 origin server should have keep-alive enabled. Here is a configuration sample:\nupstream hugo { server 127.0.0.1:1313; keepalive 60; } location / { proxy_http_version 1.1; proxy_set_header Connection \u0026#34;\u0026#34;; proxy_pass http://hugo; } 504 Gateway Timeout Symptom Web page takes long time to connect and eventually show 504 Gateway Timeout.\nSolution The original server may slow to response, try to increase timeout:\nproxy_connect_timeout 120; proxy_send_timeout 120; proxy_read_timeout 120; send_timeout 120; 502 Bad Gateway - sslv3 alert handshake failure Symptom nginx config:\nlocation /echo4/ { proxy_pass https://example-upstream.com/echo4/; } 502 Bad Gateway error:\n$ curl -i localhost:2020/echo4/ HTTP/1.1 502 Bad Gateway Server: nginx/1.17.9 Date: Thu, 12 Mar 2020 03:27:03 GMT Content-Type: text/html Content-Length: 157 Connection: keep-alive \u0026lt;html\u0026gt; \u0026lt;head\u0026gt;\u0026lt;title\u0026gt;502 Bad Gateway\u0026lt;/title\u0026gt;\u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;center\u0026gt;\u0026lt;h1\u0026gt;502 Bad Gateway\u0026lt;/h1\u0026gt;\u0026lt;/center\u0026gt; \u0026lt;hr\u0026gt;\u0026lt;center\u0026gt;nginx/1.17.9\u0026lt;/center\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; If NGINX report 502 error, first check NGINX error.log.\nFor example I got a 502 bad gateway error and have an error log as following:\n2020/03/11 17:02:03 [error] 57041#0: *19 SSL_do_handshake() failed (SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:SSL alert number 40) while SSL handshaking to upstream, client: 127.0.0.1, server: localhost, request: \u0026quot;GET /echo4/ HTTP/1.1\u0026quot;, upstream: \u0026quot;https://14.18.7.220:443/echo4/\u0026quot;, host: \u0026quot;localhost:2020\u0026quot; This tells me the SSL connection to upstream hand shake failed.\nTest it with openssl should see similar error:\n$ openssl s_client -connect example-upstream.com:443 CONNECTED(00000006) 4504165868:error:14004410:SSL routines:CONNECT_CR_SRVR_HELLO: sslv3 alert handshake failure: /BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/ssl/ssl_pkt.c:1200: SSL alert number 40 4504165868:error:140040E5:SSL routines:CONNECT_CR_SRVR_HELLO: ssl handshake failure: /BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/ssl/ssl_pkt.c:585: --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 7 bytes and written 0 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : 0000 Session-ID: Session-ID-ctx: Master-Key: Start Time: 1583973354 Timeout : 7200 (sec) Verify return code: 0 (ok) --- $ openssl version LibreSSL 2.8.3 Use brew provided openssl does not have this issue:\n$ /usr/local/Cellar/openssl\\@1.1/1.1.1d/bin/openssl s_client -connect example-upstream.com:443 CONNECTED(00000006) depth=2 C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root verify return:1 depth=1 C = US, ST = CA, L = San Francisco, O = \u0026#34;CloudFlare, Inc.\u0026#34;, CN = CloudFlare Inc ECC CA-2 verify return:1 depth=0 C = US, ST = CA, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = sni.cloudflaressl.com verify return:1 --- Certificate chain 0 s:C = US, ST = CA, L = San Francisco, O = \u0026#34;Cloudflare, Inc.\u0026#34;, CN = sni.cloudflaressl.com i:C = US, ST = CA, L = San Francisco, O = \u0026#34;CloudFlare, Inc.\u0026#34;, CN = CloudFlare Inc ECC CA-2 1 s:C = US, ST = CA, L = San Francisco, O = \u0026#34;CloudFlare, Inc.\u0026#34;, CN = CloudFlare Inc ECC CA-2 i:C = IE, O = Baltimore, OU = CyberTrust, CN = Baltimore CyberTrust Root --- Server certificate -----BEGIN CERTIFICATE----- MIIE4zCCBImgAwIBAgIQD... I run into this issue with a Cloudflare upstream server.\nThe root cause is the default Mac OS openssl does not support TLS 1.3 properly.\nSolution To solve this issue in nginx, need re-install nginx (you may need re-compile) with openssl library (Not LibreSSL provided by Mac OS).\n504 Gateway Time-out - upstream timed out Symptom 2020/10/06 18:58:09 [error] 500#500: *1418 upstream timed out (110: Connection timed out) while connecting to upstream, client: 1.2.3.4, server: foo.example.com, request: \u0026quot;GET / HTTP/1.1\u0026quot;, upstream: \u0026quot;http://[::1]:2020/\u0026quot;, host: \u0026quot;foo.example.com\u0026quot; The config like below:\nlocation / { proxy_pass http://localhost:2020/; } Solution The config use localhost caused resolve to IPv6 address ::1 and server not listen on IPv6.\nTo avoid this issue, use 127.0.0.1 instead of localhost in proxy_pass:\nlocation / { proxy_pass http://127.0.0.1:2020/; } 502 Bad Gateway - Too large header Symptom too big header error in NGINX error.log:\nupstream sent too big header while reading response header from upstream You can use curl -I to fetch the response headers only, you may see very large header. For example, it may include lots Cookie caused too large header:\n$ curl -I localhost:3000/logout HTTP/1.1 302 Found Location: http://localhost:3000/ Content-Type: text/html; charset=utf-8 X-Ua-Compatible: IE=Edge Cache-Control: no-cache X-Request-Id: fe41f23970ed792163b49210790a1bc5 X-Runtime: 0.002031 Vary: Origin X-Rack-Cors: miss; no-origin Server: WEBrick/1.3.1 (Ruby/2.0.0/2015-12-16) Date: Thu, 06 Feb 2020 03:19:03 GMT Content-Length: 88 Connection: Keep-Alive Set-Cookie: xsrf-token=xfyj%2FGhBGNwbfoet2VPnKTO7BWnkqAS1jY3wr%2BV9cSQ%3D; path=/ Set-Cookie: session=Vom40W3EDxuOWNWrVQ9msOYUvnwM42Eez9AvaMAtj69lbnXPwM7AGCihD40MF3zrVV/58bvj4bIU7R5NtkJPeFIx1JjJ8lI3df9uij8VvuNd4UhvNs8tOM13P4Lsl2KbYz9WY9o4ZIwpkhq+AI641jU4gKGHhHkuiYwwGioYFhLKx3/Fsn+tEEv8cgE4lYoF+G2tFJg3cL05/SVkM52; path=/; HttpOnly Set-Cookie: lang=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: ae=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: cv=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: es=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: event69=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: mbox=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: promocode=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: s_cc=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: s_fid=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: s_gpid=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: s_nb=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: provider_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: provider_name=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: user_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: api_token=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: shost=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: app_version=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: user_token=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: dashboard=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: tags=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: option_1=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: option_2=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: option_3=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: option_4=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: option_5=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: option_6=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_1=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_2=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_3=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_4=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_5=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_6=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_7=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: memo_4s_8=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT Solution Increase proxy_buffer_size under server:\nproxy_buffer_size 8k; proxy_buffers 16 8k; Note: Only update proxy_buffer_size may not work, when you run nginx -t to test the configuration, it may report following error:\n$ sudo nginx -t nginx: [emerg] \u0026#34;proxy_busy_buffers_size\u0026#34; must be less than the size of all \u0026#34;proxy_buffers\u0026#34; minus one buffer in /etc/nginx/nginx.conf:68 nginx: configuration file /etc/nginx/nginx.conf test failed In this case, you need also increase proxy_buffers .\nOriginal server redirect missing port number in URL Symptom When original server response a redirect use Location header, the redirect URL missing proxy server port number.\nRoot cause It due to request to original server do not have correct Host header. For example, Host may wrongly set to $host :\nproxy_set_header Host $host Solution Set Host header value to $proxy_host to include server name and port number:\nproxy_set_header Host $proxy_host Pass through https In normal reverse proxy configuration, NGINX act as a TLS terminator, it will not pass TLS connection to original server. In some scenario want to use NGINX pass through https traffic to original server, for example original server can verify the client\u0026rsquo;s TSL certificate before setup TLS connection.\nIn this case, we need NGINX run as a load balance to pass through traffic.\nUse top level of stream block to config virtual server\nstream { server { listen 443; proxy_pass original.example.com:443; } } NOTE: NGINX as a load balance, it can pass through any TCP and UDP traffic, not necessary HTTP traffic. For example, you can also pass through MySQL to\nstream { server { listen 3306; proxy_pass mysql-server.example.com:3306; } } Example of set an UDP load balance for DNS server, you need add udp after port in listen directive:\nstream { upstream dns_servers { least_conn; server 192.168.136.130:53; server 192.168.136.131:53; server 192.168.136.132:53; } server { listen 53 udp; proxy_pass dns_servers; } } A reference of reverse proxy server configuration server { listen 2020; server_name example.djangocas.dev; proxy_connect_timeout 120; proxy_send_timeout 120; proxy_read_timeout 120; send_timeout 120; proxy_buffer_size 8k; proxy_buffers 16 8k; proxy_http_version 1.1; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; location /api/ { proxy_pass https://example.com/demo/api/; } location / { proxy_pass http://127.0.0.1:1313; } access_log /var/log/nginx/example-site/access.log; error_log /var/log/nginx/example-site/error.log; } NGINX Directives Reference proxy_pass Syntax:proxy_pass URL;Default:—Context:location, if in location, limit_exceptSets the protocol and address of a proxied server and an optional URI to which a location should be mapped. As a protocol, “http” or “https” can be specified. The address can be specified as a domain name or IP address, and an optional port:\nproxy_pass http://127.0.0.1:8000/uri/; or as a UNIX-domain socket path specified after the word “unix” and enclosed in colons:\nproxy_pass http://unix:/tmp/backend.socket:/uri/; If a domain name resolves to several addresses, all of them will be used in a round-robin fashion. In addition, an address can be specified as a server group.\nParameter value can contain variables. In this case, if an address is specified as a domain name, the name is searched among the described server groups, and, if not found, is determined using a resolver.\nA request URI is passed to the server as follows:\nIf the proxy_pass directive is specified with a URI, then when a request is passed to the server, the part of a normalized request URI matching the location is replaced by a URI specified in the directive:\nlocation /name/ { proxy_pass http://127.0.0.1/remote/; } If proxy_pass is specified without a URI, the request URI is passed to the server in the same form as sent by a client when the original request is processed, or the full normalized request URI is passed when processing the changed URI:\nlocation /some/path/ { proxy_pass http://127.0.0.1; } Before version 1.1.12, if proxy_pass is specified without a URI, the original request URI might be passed instead of the changed URI in some cases. In some cases, the part of a request URI to be replaced cannot be determined:\nWhen location is specified using a regular expression, and also inside named locations. In these cases, proxy_pass should be specified without a URI.\nWhen the URI is changed inside a proxied location using the rewrite directive, and this same configuration will be used to process a request (break):\nlocation /name/ { rewrite /name/([^/]+) /users?name=$1 break; proxy_pass http://127.0.0.1; } In this case, the URI specified in the directive is ignored and the full changed request URI is passed to the server.\nWhen variables are used in proxy_pass:\nlocation /name/ { proxy_pass http://127.0.0.1$request_uri; } In this case, if URI is specified in the directive, it is passed to the server as is, replacing the original request URI. WebSocket proxying requires special configuration and is supported since version 1.3.13.\nproxy_buffer_size Syntax:proxy_buffer_size size;Default:proxy_buffer_size 4k|8k;Context:http, server, locationSets the size of the buffer used for reading the first part of the response received from the proxied server. This part usually contains a small response header. By default, the buffer size is equal to one memory page. This is either 4K or 8K, depending on a platform. It can be made smaller, however.\nproxy_buffers Syntax:proxy_buffers number size;Default:proxy_buffers 8 4k|8k;Context:http, server, locationSets the number and size of the buffers used for reading a response from the proxied server, for a single connection. By default, the buffer size is equal to one memory page. This is either 4K or 8K, depending on a platform.\nproxy_busy_buffers_size Syntax:proxy_busy_buffers_size size;Default:proxy_busy_buffers_size 8k|16k;Context:http, server, locationWhen buffering of responses from the proxied server is enabled, limits the total size of buffers that can be busy sending a response to the client while the response is not yet fully read. In the meantime, the rest of the buffers can be used for reading the response and, if needed, buffering part of the response to a temporary file. By default, size is limited by the size of two buffers set by the proxy_buffer_size and proxy_buffers directives.\nproxy_http_version Syntax:proxy_http_version 1.0 | 1.1;Default:proxy_http_version 1.0;Context:http, server, locationThis directive appeared in version 1.1.4.\nSets the HTTP protocol version for proxying. By default, version 1.0 is used. Version 1.1 is recommended for use with keepalive connections and NTLM authentication.\nproxy_set_header Syntax:proxy_set_header field value;Default:proxy_set_header Host $proxy_host;proxy_set_header Connection close;Context:http, server, locationAllows redefining or appending fields to the request header passed to the proxied server. The value can contain text, variables, and their combinations. These directives are inherited from the previous level if and only if there are no proxy_set_header directives defined on the current level.\nBy default, only two fields are redefined:\nproxy_set_header Host $proxy_host; proxy_set_header Connection close; If caching is enabled, the header fields “If-Modified-Since”, “If-Unmodified-Since”, “If-None-Match”, “If-Match”, “Range”, and “If-Range” from the original request are not passed to the proxied server.\nAn unchanged “Host” request header field can be passed like this:\nproxy_set_header Host $http_host; However, if this field is not present in a client request header then nothing will be passed. In such a case it is better to use the $host variable - its value equals the server name in the “Host” request header field or the primary server name if this field is not present:\nproxy_set_header Host $host; In addition, the server name can be passed together with the port of the proxied server:\nproxy_set_header Host $host:$proxy_port; If the value of a header field is an empty string then this field will not be passed to a proxied server:\nproxy_set_header Accept-Encoding \u0026#34;\u0026#34;; NIGNX Embedded Variables Embedded variables that can be used to compose headers using the proxy_set_header directive.\n$host In this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a request.\nIt does not include port number.\ne.g. In request curl 'http://localhost:2020/abc', the $host is localhost.\n$remote_addr client address. e.g. 1.2.3.4.\n$remote_port client port. e.g. 24510.\n$server_name name of the server which accepted a request.\n$server_port port of the server which accepted a request.\ne.g. In request curl 'http://localhost:2020/abc', the $server_port is 2020.\n$proxy_host name and port of a proxied server as specified in the proxy_pass directive.\ne.g. In following config, $proxy_host is example.com:2019.\nlocation /path1/ { proxy_pass http://example.com:2019/another/; } $proxy_port port of a proxied server as specified in the proxy_pass directive, or the protocol’s default port;\n$proxy_add_x_forwarded_for the “X-Forwarded-For” client request header field with the $remote_addr variable appended to it, separated by a comma. If the “X-Forwarded-For” field is not present in the client request header, the $proxy_add_x_forwarded_for variable is equal to the $remote_addr variable.\nReference NGINX Reverse Proxy NGINX: HTTP Keepalive Connections and Web Performance NGINX: Module ngx_http_proxy_module NGINX: Module ngx_http_core_module NGINX: TCP and UDP Load Balancing ","excerpt":"The difference between a forward proxy server and a reverse proxy server A common question is …","ref":"https://djangocas.dev/blog/nginx-reverse-proxy-configuration-and-troubleshooting/","title":"NGINX Reverse Proxy Configuration and Troubleshooting"},{"body":"What is core dump The default action of certain signals is to cause a process to terminate and produce a core dump file, a disk file containing an image of the process\u0026rsquo;s memory at the time of termination. This image can be used in a debugger (e.g., gdb) to inspect the state of the program at the time that it terminated.\nIn some Linux, the default core dump file name is core. If there are multiple core dump happen, the later core will override the previous one. To keep the all the core dump files for easier core dumps debugging, different core dump should have different name.\ncore dump is disabled by default, to enable core dump, use ulimit -c\n$ ulimit -c unlimited Then you will see:\n$ ulimit -c unlimited $ ulimit -a | grep core core file size (blocks, -c) unlimited Symptom There is suggestion to use kernel.core_name_format control coredump file name, but got following error:\n$ sudo sysctl -w kernel.core_name_format=\u0026#34;core.%e.%p.%s.%t\u0026#34; sysctl: cannot stat /proc/sys/kernel/core_name_format: No such file or directory Troubleshooting The kernel.core_name_format is not exist in kernel parameters, the correct one is kernel.core_pattern. e.g.\n$ sudo sysctl -w kernel.core_pattern=\u0026quot;core.%e.%p.%s.%t\u0026quot; kernel.core_pattern = core.%e.%p.%s.%t By default, a core dump file is named core, but the /proc/sys/kernel/core_pattern file (since Linux 2.6 and 2.4.21) can be set to define a template that is used to name core dump files. The template can contain % specifiers which are substituted by the following values when a core file is created:\n %% a single % character %c core file size soft resource limit of crashing process (since Linux 2.6.24) %d dump mode—same as value returned by prctl(2) PR_GET_DUMPABLE (since Linux 3.7) %e executable filename (without path prefix) %E pathname of executable, with slashes ('/') replaced by exclamation marks ('!') (since Linux 3.0). %g (numeric) real GID of dumped process %h hostname (same as nodename returned by uname(2)) %i TID of thread that triggered core dump, as seen in the PID namespace in which the thread resides (since Linux 3.18) %I TID of thread that triggered core dump, as seen in the initial PID namespace (since Linux 3.18) %p PID of dumped process, as seen in the PID namespace in which the process resides %P PID of dumped process, as seen in the initial PID namespace (since Linux 3.12) %s number of signal causing dump %t time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC) %u (numeric) real UID of dumped process Debugging core file The most gdb command used for a core dump file debugging is bt (or backtrace) to show the crash stack. f \u0026lt;n\u0026gt; (or frame \u0026lt;n\u0026gt;) to switch to function call, info locals and info args also helpfule.\nExample of gdb session for a core dump debugging:\n$ gdb a.out core ... ... Type \u0026#34;apropos word\u0026#34; to search for commands related to \u0026#34;word\u0026#34;... Reading symbols from a.out...done. [New LWP 17239] [Thread debugging using libthread_db enabled] Using host libthread_db library \u0026#34;/lib/arm-linux-gnueabihf/libthread_db.so.1\u0026#34;. btCore was generated by `./a.out\u0026#39;. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50\t../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x76e06230 in __GI_abort () at abort.c:79 #2 0x00015308 in bar (x=0x1eb6fa8) at foo.c:196 #3 0x00014834 in foo (x=0x1eb6fa8, y=0x1ba9c90) at foo.c:310 #4 0x00014660 in main (argc=1, argv=0x7ea78684) at foo.c:272 (gdb) f 3 #3 0x00014834 in foo (x=0x1eb6fa8, y=0x1ba9c90) at proxyd/proxyd.c:310 310\tret = bar(x); (gdb) info args x = 0x1eb6fa8 y = 0x1ba9c90 (gdb) info locals ret = 32354640 ... References Linux kernel parameters (search core_pattern) man core ","excerpt":"What is core dump The default action of certain signals is to cause a process to terminate and …","ref":"https://djangocas.dev/blog/linux/troubleshooting-core_name_format-no-such-file-or-directory-core_pattern/","title":"Troubleshooting sysctl: cannot stat /proc/sys/kernel/core_name_format: No such file or directory Set core dump file name pattern core_pattern"},{"body":"What is net.ipv4.tcp_tw_recycle Per Linux kernel document networking/ip-sysctl.txt:\n tcp_tw_recycle - BOOLEAN\nEnable fast recycling TIME-WAIT sockets. Default value is 0. It should not be changed without advice/request of technical experts.\n This documentation is not clear what is mechanism and what is the side effect.\nSymptom - sysctl: cannot stat /proc/sys/net/ipv4/tcp_tw_recycle: No such file or directory When I tried to put following line into /etc/sysctl.conf:\nnet.ipv4.tcp_tw_recycle = 0 Then use sysctl -p to reload it, I got following error:\n$ sudo sysctl -p sysctl: cannot stat /proc/sys/net/ipv4/tcp_tw_recycle: No such file or directory Analysis The net.ipv4.tcp_tw_recycle has been removed from Linux 4.12 on 2017.\nCheck kernel version:\n$ uname -a Linux pi3 4.19.97-v7+ #1294 SMP My kernel version is 4.19 which is newer than 4.12, net.ipv4.tcp_tw_recycle is not available anymore. This error can be safely ignored.\nShould not set this option anymore.\nReason to remove Per kernel git commit history, tcp_tw_recycle is not functional and cause problem.\n The tcp_tw_recycle was already broken for connections behind NAT, since the per-destination timestamp is not monotonically increasing for multiple machines behind a single destination address.\nAfter the randomization of TCP timestamp offsets in commit 8a5bd45f6616 (tcp: randomize tcp timestamp offsets for each connection), the tcp_tw_recycle is broken for all types of connections for the same reason: the timestamps received from a single machine is not monotonically increasing, anymore.\nRemove tcp_tw_recycle, since it is not functional. Also, remove the PAWSPassive SNMP counter since it is only used for tcp_tw_recycle, and simplify tcp_v4_route_req and tcp_v6_route_req since the strict argument is only set when tcp_tw_recycle is enabled.\nLinux kernel commit 4396e4618: tcp: remove tcp_tw_recycle .\n Suggestion Consider to use tcp_tw_reuse by set to 1 to improve network server performance:\nnet.ipv4.tcp_tw_reuse = 1 tcp_tw_reuse - INTEGER\nEnable reuse of TIME-WAIT sockets for new connections when it is safe from protocol viewpoint.\n 0 - disable 1 - global enable 2 - enable for loopback traffic only It should not be changed without advice/request of technical experts.\nDefault: 2\n Read more:\n Troubleshooting sysctl: cannot stat /proc/sys/kernel/core_name_format: No such file or directory Set core dump file name pattern core_pattern Huge improve network performance by change TCP congestion control to BBR References Linux kernel commit: tcp: remove tcp_tw_recycle Linux kernel Documentation/networking/ip-sysctl.txt Coping with the TCP TIME-WAIT state on busy Linux servers Linux Kernel documentation: /proc/sys/net/ipv4/* Variables ","excerpt":"What is net.ipv4.tcp_tw_recycle Per Linux kernel document networking/ip-sysctl.txt:\n tcp_tw_recycle …","ref":"https://djangocas.dev/blog/troubleshooting-tcp_tw_recycle-no-such-file-or-directory/","title":"Troubleshooting sysctl: cannot stat /proc/sys/net/ipv4/tcp_tw_recycle: No such file or directory"},{"body":"What is BBR BBR is Bottleneck Bandwidth and RTT. BBR congestion control computes the sending rate based on the delivery rate (throughput) estimated from ACKs.\nBBR (Bottleneck Bandwidth and Round-trip propagation time) is a congestion control algorithm for optimizing TCP network performance. Unlike traditional congestion control algorithms like TCP Cubic, which rely on packet loss as a signal for congestion, BBR uses estimates of the bottleneck bandwidth and round-trip time to manage the rate at which data is sent. This allows for more efficient utilization of network resources, potentially leading to higher throughput and lower latency, especially on high-bandwidth or long-distance connections. BBR was introduced in the Linux kernel starting from version 4.9.\nBBR has significantly increased throughput and reduced latency for connections on Google's internal backbone networks and google.com and YouTube Web servers.\nBBR requires only changes on the sender side, not in the network or the receiver side. Thus it can be incrementally deployed on today's Internet, or in datacenters.\nLinux kernel commit message for tcp_bbr: add BBR congestion control How to enable BBR bbr need Linux kernel version 4.9 or above, use uname -r to your Linux kernel version:\n$ uname -a Linux pi3 4.19.97-v7+ #1294 List available congestion control algorithms and your current setting:\n$ sysctl net.ipv4.tcp_available_congestion_control net.ipv4.tcp_available_congestion_control = reno cubic $ sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_congestion_control = cubic To enable BBR, need enable kernel module tcp_bbr:\n# modprobe tcp_bbr # echo \u0026#34;tcp_bbr\u0026#34; \u0026gt; /etc/modules-load.d/bbr.conf After modprobe tcp_bbr, bbr should be available in the list of tcp_available_congestion_control:\n$ sysctl net.ipv4.tcp_available_congestion_control net.ipv4.tcp_available_congestion_control = reno cubic bbr Then adding following two lines to /etc/sysctl.conf:\nnet.ipv4.tcp_congestion_control = bbr net.core.default_qdisc = fq # BBR must be used with fq qdisc, see note below Then reload /etc/sysctl.conf:\n$ sudo sysctl -p ... ... net.ipv4.tcp_congestion_control = bbr net.core.default_qdisc = fq Now you can double check to make sure bbr is enabled:\n$ sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_congestion_control = bbr Note BBR must be used with the fq qdisc with pacing enabled, since pacing is integral to the BBR design and implementation.\nBBR without pacing would not function properly, and may incur unnecessary high packet loss rates.\n How to test network performance iperf3 is a utility to perform network throughput tests.\n$ sudo apt-get install -y iperf3 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libiperf0 libsctp1 Suggested packages: lksctp-tools The following NEW packages will be installed: iperf3 libiperf0 libsctp1 ... iperf3 can use -C (or --congestion) to choose congestion control algorithm. In our test, we can specific bbr.\n-C, --congestion algo Set the congestion control algorithm (Linux and FreeBSD only). An older --linux-congestion synonym for this flag is accepted but is deprecated. iperf -C bbr -c example.com # replace example.com with your test target Note BBR TCP is sender side only, so you do not need to worry if the receiver supports BBR. Note that BBR is much more effective when using FQ (fair queuing) to pace packets to at most 90% of line rate. How can I monitor Linux TCP BBR connections? You can use ss (another utility to investigate sockets) to monitor BBR state variables, including pacing rate, cwnd, bandwidth estimate, min_rtt estimate, etc.\nss -tin example output:\n$ ss -tin State Recv-Q Send-Q Local Address:Port Peer Address:Port Process ESTAB 0 36 10.0.0.55:22 123.23.12.98:61030 bbr wscale:6,7 rto:292 rtt:91.891/20.196 ato:40 mss:1448 pmtu:9000 rcvmss:1448 advmss:8948 cwnd:48 bytes_sent:95301 bytes_retrans:136 bytes_acked:95129 bytes_received:20641 segs_out:813 segs_in:1091 data_segs_out:792 data_segs_in:481 bbr:(bw:1911880bps,mrtt:73.825,pacing_gain:2.88672,cwnd_gain:2.88672) send 6050995bps lastsnd:4 lastrcv:8 lastack:8 pacing_rate 5463880bps delivery_rate 1911928bps delivered:791 app_limited busy:44124ms unacked:1 retrans:0/2 dsack_dups:1 rcv_space:56576 rcv_ssthresh:56576 minrtt:73.825 Below fields may appear:\nts show string \u0026quot;ts\u0026quot; if the timestamp option is set sack show string \u0026quot;sack\u0026quot; if the sack option is set ecn show string \u0026quot;ecn\u0026quot; if the explicit congestion notification option is set ecnseen show string \u0026quot;ecnseen\u0026quot; if the saw ecn flag is found in received packets fastopen show string \u0026quot;fastopen\u0026quot; if the fastopen option is set cong_alg the congestion algorithm name, the default congestion algorithm is \u0026quot;cubic\u0026quot; wscale:\u0026lt;snd_wscale\u0026gt;:\u0026lt;rcv_wscale\u0026gt; if window scale option is used, this field shows the send scale factor and receive scale factor rto:\u0026lt;icsk_rto\u0026gt; tcp re-transmission timeout value, the unit is millisecond backoff:\u0026lt;icsk_backoff\u0026gt; used for exponential backoff re-transmission, the actual re-transmission timeout value is icsk_rto \u0026lt;\u0026lt; icsk_backoff rtt:\u0026lt;rtt\u0026gt;/\u0026lt;rttvar\u0026gt; rtt is the average round trip time, rttvar is the mean deviation of rtt, their units are mil‐ lisecond ato:\u0026lt;ato\u0026gt; ack timeout, unit is millisecond, used for delay ack mode mss:\u0026lt;mss\u0026gt; max segment size cwnd:\u0026lt;cwnd\u0026gt; congestion window size pmtu:\u0026lt;pmtu\u0026gt; path MTU value ssthresh:\u0026lt;ssthresh\u0026gt; tcp congestion window slow start threshold bytes_acked:\u0026lt;bytes_acked\u0026gt; bytes acked bytes_received:\u0026lt;bytes_received\u0026gt; bytes received segs_out:\u0026lt;segs_out\u0026gt; segments sent out segs_in:\u0026lt;segs_in\u0026gt; segments received send \u0026lt;send_bps\u0026gt;bps egress bps lastsnd:\u0026lt;lastsnd\u0026gt; how long time since the last packet sent, the unit is millisecond lastrcv:\u0026lt;lastrcv\u0026gt; how long time since the last packet received, the unit is millisecond lastack:\u0026lt;lastack\u0026gt; how long time since the last ack received, the unit is millisecond pacing_rate \u0026lt;pacing_rate\u0026gt;bps/\u0026lt;max_pacing_rate\u0026gt;bps the pacing rate and max pacing rate rcv_space:\u0026lt;rcv_space\u0026gt; a helper variable for TCP internal auto tuning socket receive buffer TCP Throughput Improvement Examples From Google Google Search, Youtube deployed BBR and gain TCP performance improvement.\nExample performance results, to illustrate the difference between BBR and CUBIC:\n Resilience to random loss (e.g. from shallow buffers):\nConsider a netperf TCP_STREAM test lasting 30 secs on an emulated path with a 10Gbps bottleneck, 100ms RTT, and 1% packet loss rate. CUBIC gets 3.27 Mbps, and BBR gets 9150 Mbps (2798x higher).\n Low latency with the bloated buffers common in today\u0026rsquo;s last-mile links:\nConsider a netperf TCP_STREAM test lasting 120 secs on an emulated path with a 10Mbps bottleneck, 40ms RTT, and 1000-packet bottleneck buffer. Both fully utilize the bottleneck bandwidth, but BBR achieves this with a median RTT 25x lower (43 ms instead of 1.09 secs).\n From AWS CloudFront During March and April 2019, AWS CloudFront deployed BBR. Per AWS blog: TCP BBR Congestion Control with Amazon CloudFront :\n Using BBR in CloudFront has been favorable overall, with performance gains of up to 22% improvement on aggregate throughput across several networks and regions.\n From Shadowsocks I have a Shadowsocks server running on Raspberry Pi, without BBR, the client download speed is round 450 KB/s. With BBR, the client download speed improve to 3.6MB/s which is 8 times than default.\nBBR v2 There is a on-going work for BBR v2 still in alpha phase.\nTroubleshooting sysctl: setting key \u0026ldquo;net.core.default_qdisc\u0026rdquo;: No such file or directory sysctl set net.core.default_qdisc may run into following error:\nsysctl: setting key \u0026quot;net.core.default_qdisc\u0026quot;: No such file or directory The reason is tcp_bbr kernel module is not load yet. To load tcp_bbr, run following command:\nsudo modprobe tcp_bbr To verify tcp_bbr is loaded, use lsmod, for example, in following command, you should see tcp_bbr line:\n$ lsmod | grep tcp_bbr tcp_bbr 20480 3 If sudo modprobe tcp_bbr does not work out, reboot.\nReferences BBR Project: source code, documentation etc. TCP BBR Quick-Start Linux kernel commit: tcp_bbr: add BBR congestion control BBR v1 implementation in Linux kernel BBR v2alpha implementation in Linux kernel man tc-fq ","excerpt":"What is BBR BBR is Bottleneck Bandwidth and RTT. BBR congestion control computes the sending rate …","ref":"https://djangocas.dev/blog/huge-improve-network-performance-by-change-tcp-congestion-control-to-bbr/","title":"Huge improve network performance by change TCP congestion control to BBR"},{"body":"How to do in-place upgrade Debian without data loss I have a old Raspberry Pi 3 running for many years, it still running on jessie and everything goes well, except I want to install some software which does not exist on jessie.\nSince jessie, there are two major releases stretch and buster. It is time to upgrade to my Raspberry Pi OS to keep it up to date.\nThe official recommendation for major release is re-image.\n As this is a major version upgrade, we recommend using a clean image.\n However I do not want to re-image SD card since I have exist service running and it take me a lot of time tweak exist system configuration. I do not want to re-configure everything\u0026hellip;\nSince Raspberry Pi OS is based on Debian, Debian support in-place major release upgrade. This is also mentioned in Raspberry Pi blog raspbian-stretch Upgrading an existing Jessie image is possible, but is not guaranteed to work in every circumstance. If you wish to try upgrading a Jessie image to Stretch, we strongly recommend taking a backup first – we can accept no responsibility for loss of data from a failed update.\n I will take the risk to try this in-place upgrade.\nSince there are two major releases, I need upgrade to stretch, then upgrade to buster.\nPreparation Backup the important data is always a good idea in case upgrade failure and can not boot system. Check free disk space (df -h) before upgrade, OS upgrade normally need extra disk space. Remove unused packages to reduce disk space usage. jessie to stretch in place upgrade without data loss Replace jessie with stretch in /etc/apt/sources.list and /etc/apt/sources.list.d/raspi.list:\n$ sudo sed -i \u0026#39;s/jessie/stretch/g\u0026#39; /etc/apt/sources.list $ sudo sed -i \u0026#39;s/jessie/stretch/g\u0026#39; /etc/apt/sources.list.d/raspi.list $ sudo apt-get update $ sudo apt-get -y dist-upgrade Answer yes or no to prompts based your settings.\nNote You do not need follow raspbian blog raspbian-stretch answer yes to anything. It will replace your changed config to original config file. You will lost your changes!\ne.g. You may make changes in /etc/sysctl.conf, upgrade process will detect this change and will ask you replace it or keep it:\nConfiguration file '/etc/sysctl.conf' ==\u0026gt; Modified (by you or by a script) since installation. ==\u0026gt; Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. After dist-upgrade, you may optional install font to fix missing Chinese and Japanese fonts:\n$ sudo apt-get install -y fonts-droid-fallback If you are not using PulseAudio for anything other than Bluetooth audio, remove it from the image by entering\n$ sudo apt-get -y purge \u0026#34;pulseaudio*\u0026#34; The last step is clean apt, remove un-used packages and reboot:\n$ sudo apt-get autoremove $ sudo reboot stretch to buster in place upgrade without data loss Similar with jessie to buster, I need replace apt source:\n$ sudo sed -i \u0026#39;s/stretch/buster/g\u0026#39; /etc/apt/sources.list $ sudo sed -i \u0026#39;s/stretch/buster/g\u0026#39; /etc/apt/sources.list.d/raspi.list Then update:\n$ sudo apt-get update $ sudo apt-get -y dist-upgrade However I got following error this time:\nErrors were encountered while processing: /tmp/apt-dpkg-install-pxzIiX/152-firmware-misc-nonfree_1%3a20190114-1+rpt4_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I re-run sudo apt-get -y dist-upgrade and got following errors:\n$ sudo apt-get -y dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: firmware-ralink : Depends: firmware-misc-nonfree but it is not installed N: Ignoring file '50unattended-upgrades.ucftmp' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). Follow the instruction, I hope apt --fix-broken install can fix problem:\n$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: firmware-misc-nonfree firmware-ralink g++-6 gnupg-agent libaio1 libbabeltrace-ctf1 libbind9-140 libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-system1.62.0 libcdio13 libcomerr2 libdns-export162 libdns162 libdrm-freedreno1 libevent-2.0-5 libfile-copy-recursive-perl libglew2.0 libhiredis0.13 libicu57 libisc-export160 libisc160 libisccc140 libisccfg140 libiso9660-8 libjim0.76 liblwres141 libmpfr4 libperl5.24 libprocps6 libpython3.5 libpython3.5-dev libpython3.5-minimal libpython3.5-stdlib libssl1.0.2 libstdc++-6-dev libtxc-dxtn-s2tc0 libunistring0 libva-x11-1 libwebpmux2 lynx-cur python-apt python3-pyasn1 python3.5 python3.5-dev python3.5-minimal python3.5-venv rename rsync sgml-base xml-core Use \u0026#39;sudo apt autoremove\u0026#39; to remove them. The following additional packages will be installed: firmware-misc-nonfree The following NEW packages will be installed: firmware-misc-nonfree 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Looks good, then I re-run sudo apt-get -y dist-upgrade again, everything goes well this time.\nAfter dist-upgrade success, clean apt and reboot:\n$ sudo apt-get autoremove $ sudo reboot After reboot, check the release info, you got buster:\n$ lsb_release -a No LSB modules are available. Distributor ID:\tRaspbian Description:\tRaspbian GNU/Linux 10 (buster) Release:\t10 Codename:\tbuster Continue upgrade to Bullseye Debian 11.2 (Codenamed: Bullseye) was released on December 18th, 2021. To continue upgrade from Buster to Bullseye, similar with jessie to buster, I need replace apt source:\n$ sudo sed -i \u0026#39;s/buster/bullseye/g\u0026#39; /etc/apt/sources.list $ sudo sed -i \u0026#39;s/buster/bullseye/g\u0026#39; /etc/apt/sources.list.d/raspi.list Then update:\n$ sudo apt-get update # Update the Bullseye software repositories. $ sudo apt-get -y dist-upgrade After dist-upgrade success, clean apt and reboot:\n$ sudo apt-get autoremove $ sudo reboot After reboot, check the release info, you should have the latest Debian release Bullseye.\nDuring dist-upgrade, you may encounter following error:\nThe following packages have unmet dependencies: libc6-dev : Breaks: libgcc-8-dev (\u0026lt; 8.4.0-2~) but 8.3.0-6+rpi1 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. To fix this, run the following command to upgrade libgcc-8-dev first:\n$ sudo apt install libgcc-8-dev ... ... The following packages have unmet dependencies: libgcc-8-dev : Depends: gcc-8-base (= 8.4.0-7+rpi1) but 8.3.0-6+rpi1 is to be installed Recommends: libc6-dev (\u0026gt;= 2.13-5) but it is not going to be installed E: Unable to correct problems, you have held broken packages. Actually it also need upgrade gcc-8-base first:\n$ sudo apt install gcc-8-base # Be patient, this take a longer time. Lots of packages (like python, nginx etc.) are upgraded. After gcc-8-base upgrade success, re-run sudo apt-get -y dist-upgrade to continue upgrade to Bullseye.\nContinue upgrade to Bookworm Debian 12 (Codenamed: Bookworm) was released on June 10th, 2024.\nTo continue upgrade from Bullseye to Bookworm, similar with previous upgrades, I need replace apt source:\n$ sudo sed -i \u0026#39;s/bullseye/bookworm/g\u0026#39; /etc/apt/sources.list $ sudo sed -i \u0026#39;s/bullseye/bookworm/g\u0026#39; /etc/apt/sources.list.d/raspi.list Then update:\n$ sudo apt-get update # Update the Bookworm software repositories. $ sudo apt-get -y dist-upgrade It may encounter following error during upgrade:\nSetting up raspi-firmware (1:1.20250915-1~bookworm) ... stat: cannot read file system information for \u0026#39;/boot/firmware\u0026#39;: No such file or directory Error: missing /boot/firmware, did you forget to mount it? dpkg: error processing package raspi-firmware (--configure): installed raspi-firmware package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of sense-hat: sense-hat depends on raspi-firmware; however: Package raspi-firmware is not configured yet. dpkg: error processing package sense-hat (--configure): dependency problems - leaving unconfigured Processing triggers for initramfs-tools (0.142+rpt4+deb12u3) ... Errors were encountered while processing: raspi-firmware sense-hat needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) The problem is missing /boot/firmware mount point. To fix this, create mount point and mount tmpfs to it:\n$ sudo mkdir /boot/firmware $ mount -t tmpfs -o size=128M firmware /boot/firmware Then re-run sudo apt-get -y upgrade to continue upgrade to Bookworm.\nAfter success, copy back the firmware files to /boot/firmware from tmpfs:\nsudo cp -r /boot/firmware /tmp/ sudo umount /boot/firmware sudo rm -r /boot/firmware sudo cp -r /tmp/firmware /boot/firmware After dist-upgrade success, clean apt and reboot:\n$ sudo apt-get autoremove $ sudo reboot After reboot, check the release info, you should have the latest Debian release Bookworm.\n$ lsb_release -a No LSB modules are available. Distributor ID:\tRaspbian Description:\tRaspbian GNU/Linux 12 (bookworm) Release:\t12 Codename:\tbookworm FAQ Upgrade without prompts to keep existing config files During update, it may ask to replace some config files, answer according to your needs, or just keep your current version by default with the following command options:\nsudo apt-get -y \\ -o Dpkg::Options::=\u0026#34;--force-confdef\u0026#34; \\ -o Dpkg::Options::=\u0026#34;--force-confold\u0026#34; \\ dist-upgrade What this does?\n --force-confdef Uses the package maintainer’s default action automatically when possible. --force-confold Always keeps your existing config files and prevents prompts. This combination is the standard, safe way to preserve local configs during unattended upgrades.\nDo I need upgrade firmware in OS upgrade? rpi-update is a tool to get the latest bleeding-edge firmware and kernel for your Raspberry Pi.\nThe question is should I also upgrade firmware when do OS upgrade?\nThe short answer is NO.\nYou should only use rpi-update with a good reason.\nThis gets you the latest bleeding edge kernel/firmware. There is always the possibility of regressions.\nBug fixes and improvements will eventually make their way into new Raspberry Pi OS releases and apt-get when they are considered sufficiently well tested.\nA good reason for using this would be if you like to help with the testing effort, and are happy to risk breakages and submit bug reports. These testers are welcome.\nAlso if you are suffering from a bug in current firmware (perhaps as one of the reporters of the bug on github or forum) and a fix has been pushed out for testing, then using rpi-update is the right way to get the fix until it makes its way into new Raspberry Pi OS images and apt-get.\nEven rpi-update itself not recommend use it as prt of a regular update process. When you run pi-update you got following warning:\n$ sudo rpi-update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** We\u0026#39;re running for the first time *** Backing up files (this will take a few minutes) *** Backing up firmware *** Backing up modules 5.10.63-v7+ ############################################################# WARNING: This update bumps to rpi-5.10.y linux tree See: https://www.raspberrypi.org/forums/viewtopic.php?f=29\u0026amp;t=288234 \u0026#39;rpi-update\u0026#39; should only be used if there is a specific reason to do so - for example, a request by a Raspberry Pi engineer or if you want to help the testing effort and are comfortable with restoring if there are regressions. DO NOT use \u0026#39;rpi-update\u0026#39; as part of a regular update process. ############################################################## Would you like to proceed? (y/N) If you really want to continue upgrade firmware, backing up before updating is always advisable.\nAvoid SSH disconnection during upgrade During major release upgrade, lots of packages are upgraded, it may take a long time to finish upgrade and your SSH session may timeout and disconnected.\nAdd following lines to your local ~/.ssh/config file to keep SSH connection alive:\n# Keep SSH session alive, to avoid disconnect from server. ServerAliveInterval 60 # 1 minute ServerAliveCountMax 720 # Try 720 times, total 12 hours. Continue aborted upgrade If your upgrade process is aborted due to power failure or network issue, you may got following error when re-run sudo apt upgrade:\n$ sudo apt upgrade E: dpkg was interrupted, you must manually run \u0026#39;sudo dpkg --configure -a\u0026#39; to correct the problem. To fix this, just run sudo dpkg --configure -a to continue the upgrade:\n$ sudo dpkg --configure -a References jessie to stretch dist-upgrade command output (package changes) stretch to buster dist-upgrade command output (package changes) raspbian-stretch release announce Buster – the new version of Raspbian Bullseye – the new version of Raspberry Pi OS Debian “bullseye” Release Information rpi-update Run docker on Raspberry Pi Package raspi-firmware is not configured yet ","excerpt":"How to do in-place upgrade Debian without data loss I have a old Raspberry Pi 3 running for many …","ref":"https://djangocas.dev/blog/upgrade-existing-jessie-to-buster-without-re-image/","title":"Upgrade existing Debian Jessie to Buster, Bullseye, Bookworm without re-image"},{"body":"Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages.\nInstallation Install on Mac with brew $ brew install squid ==\u0026gt; Downloading https://homebrew.bintray.com/bottles/squid-4.10.catalina.bottle.tar.gz ==\u0026gt; Downloading from https://akamai.bintray.com/b3/b317cad793854ed6b0c3933ebec75194383d5c2b47e5f868027aaa9e9decb8f9?__gd ######################################################################## 100.0% ==\u0026gt; Pouring squid-4.10.catalina.bottle.tar.gz ==\u0026gt; Caveats To have launchd start squid now and restart at login: brew services start squid Or, if you don\u0026#39;t want/need a background service you can just run: squid ==\u0026gt; Summary 🍺 /usr/local/Cellar/squid/4.10: 2,111 files, 9.8MB Start the squid:\n$ brew services start squid Configuration Configure file on Mac:\n/usr/local/etc/squid.conf acl: define source network Define allowed source by acl:\naclzerotiernetsrc10.247.110.0/24http_access: Allow traffic from specific network source Use http_access to allow traffic source:\n#http_access allow localnethttp_accessallowzerotiernethttp_port: Bind to ip:port Limit the listen port on specific IP by http_port:\n Usage: port [mode] [options] hostname:port [mode] [options] 1.2.3.4:port [mode] [options] The socket addresses where Squid will listen for HTTP client requests. You may specify multiple socket addresses.\nThere are three forms: port alone, hostname with port, and IP address with port. If you specify a hostname or IP address, Squid binds the socket to that specific address.\nMost likely, you do not need to bind to a specific address, so you can use the port number alone.\nIf you run Squid on a dual-homed machine with an internal and an external interface we recommend you to specify the internal address:port in http_port. This way Squid will only be visible on the internal address.\n #http_port 3128http_port10.247.110.135:3128# Only listen on zerotier one networkforwarded_for: X-Forwarded-For header control X-Forwarded-For header controlled by forwarded_for:\n If set to \u0026ldquo;on\u0026rdquo;, Squid will append your client\u0026rsquo;s IP address in the HTTP requests it forwards. By default it looks like:\nX-Forwarded-For: 192.1.2.3 If set to \u0026ldquo;off\u0026rdquo;, it will appear as\nX-Forwarded-For: unknown If set to \u0026ldquo;transparent\u0026rdquo;, Squid will not alter the X-Forwarded-For header in any way.\nIf set to \u0026ldquo;delete\u0026rdquo;, Squid will delete the entire X-Forwarded-For header.\nIf set to \u0026ldquo;truncate\u0026rdquo;, Squid will remove all existing X-Forwarded-For entries, and place the client IP as the sole entry.\n # Do not send X-Forwarded-For headerforwarded_fordeleteA full recommend squid.conf $cat/usr/local/etc/squid.conf## Recommended minimum configuration:## Example rule allowing access from your local networks.# Adapt to list your (internal) IP networks from where browsing# should be allowed#acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 \u0026#34;this\u0026#34; network (LAN)#acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)#acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)#acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines#acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)#acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)#acl localnet src fc00::/7 # RFC 4193 local private network range#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machinesaclzerotiernetsrc10.247.110.0/24# ZeroTier One networkaclSSL_portsport443aclSafe_portsport80# httpaclSafe_portsport21# ftpaclSafe_portsport443# httpsaclSafe_portsport70# gopheraclSafe_portsport210# waisaclSafe_portsport1025-65535# unregistered portsaclSafe_portsport280# http-mgmtaclSafe_portsport488# gss-httpaclSafe_portsport591# filemakeraclSafe_portsport777# multiling httpaclCONNECTmethodCONNECT## Recommended minimum Access Permission configuration:## Deny requests to certain unsafe portshttp_accessdeny!Safe_ports# Deny CONNECT to other than secure SSL portshttp_accessdenyCONNECT!SSL_ports# Only allow cachemgr access from localhosthttp_accessallowlocalhostmanagerhttp_accessdenymanager# We strongly recommend the following be uncommented to protect innocent# web applications running on the proxy server who think the only# one who can access services on \u0026#34;localhost\u0026#34; is a local user#http_access deny to_localhost## INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS## Example rule allowing access from your local networks.# Adapt localnet in the ACL section to list your (internal) IP networks# from where browsing should be allowed#http_access allow localnethttp_accessallowlocalhosthttp_accessallowzerotiernet# And finally deny all other access to this proxyhttp_accessdenyall# Squid normally listens to port 3128#http_port 3128http_port10.247.110.135:3128# Only listen on zerotier one network# forwarded_for X-Forwarded-For# If set to \u0026#34;on\u0026#34;, Squid will append your client\u0026#39;s IP address# in the HTTP requests it forwards. By default it looks like:## X-Forwarded-For: 192.1.2.3## If set to \u0026#34;off\u0026#34;, it will appear as## X-Forwarded-For: unknown## If set to \u0026#34;transparent\u0026#34;, Squid will not alter the# X-Forwarded-For header in any way.## If set to \u0026#34;delete\u0026#34;, Squid will delete the entire# X-Forwarded-For header.## If set to \u0026#34;truncate\u0026#34;, Squid will remove all existing# X-Forwarded-For entries, and place the client IP as the sole entry.# default forwarded_for on## Do not send X-Forwarded-For headerforwarded_fordelete# Uncomment and adjust the following to add a disk cache directory.#cache_dir ufs /usr/local/var/cache/squid 100 16 256# Leave coredumps in the first cache dircoredump_dir/usr/local/var/cache/squid## Add any of your own refresh_pattern entries above these.#refresh_pattern^ftp:144020%10080refresh_pattern^gopher:14400%1440refresh_pattern-i(/cgi-bin/|\\?)00%0refresh_pattern.020%4320References Squid configuration directives Squid configuration directive http_port Squid configuration directive forwarded_for ","excerpt":"Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and …","ref":"https://djangocas.dev/blog/secure-squid-proxy-server/","title":"Secure Squid Proxy Server"},{"body":"What is OAuth2 OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. This specification and its extensions are being developed within the IETF OAuth Working Group.\nOAuth2 standardize in RFC 6749 and RFC 6750 in 2012. IETF published a threat model for OAuth 2.0 as RFC 6819 in 2013.\nThe OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849.\nOAuth2 Grant Flows To understand OAuth2 flow, first need know following roles in OAuth2:\n resource owner\nAn entity capable of granting access to a protected resource. When the resource owner is a person, it is referred to as an end-user.\n resource server\nThe server hosting the protected resources, capable of accepting and responding to protected resource requests using access tokens.\n client\nAn application making protected resource requests on behalf of the resource owner and with its authorization. The term \u0026ldquo;client\u0026rdquo; does not imply any particular implementation characteristics (e.g., whether the application executes on a server, a desktop, or other devices).\n user-agent\nTypically a web browser.\n authorization server\nThe server issuing access tokens to the client after successfully authenticating the resource owner and obtaining authorization.\n OAuth2 use https and JSON to carry tokens.\nAuthorization Code Grant Flow (With User Interaction) The code flow is defined in RFC 6749 section 4.1.\nThe Authorization Code grant type is used by confidential and public clients to exchange an authorization code for an access token.\nAfter the user returns to the client via the redirect URL, the application will get the authorization code from the URL and use it to request an access token.\nImplicit Grant Flow (With User Interaction) The implicit grant flow is defined in RFC 6749 section 4.2.\nThe implicit grant type is used to obtain access tokens (it does not support the issuance of refresh tokens) and is optimized for public clients known to operate a particular redirection URI. These clients are typically implemented in a browser using a scripting language such as JavaScript.\nCompare to authorization code grant flow, implicit grant flow simplify token request step, authorization server return access_token to client directly.\nResource Owner Password Credentials Grant Flow (Without User Interaction) The resource owner password credentials grant flow is defined in RFC 6749 section 4.3.\nThe resource owner password credentials grant type is suitable in cases where the resource owner has a trust relationship with the client, such as the device operating system or a highly privileged application. The authorization server should take special care when enabling this grant type and only allow it when other flows are not viable.\nClient Credential Grant Flow (Without User Interaction) The client credential grant flow is defined in RFC 6749 section 4.4.\nThe Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.\nThis is typically used by clients to access resources about themselves rather than to access a user\u0026rsquo;s resources.\nOAuth2 Refresh access_token If the authorization server issued a refresh token to the client, the client makes a refresh request to the token endpoint.\ngrant_type is required and its value MUST be set to \u0026ldquo;refresh_token\u0026rdquo;.\nrefresh_token is also required.\nOAuth2 Use access_token to access protected resource The OAuth access token is a bearer token. It define in RFC 6750.\nAny party in possession of a bearer token (a \u0026ldquo;bearer\u0026rdquo;) can use it to get access to the associated resources. To prevent misuse, bearer tokens need to be protected from disclosure in storage and in transport.\nEvolution History of OAuth \u0026amp; OAuth2 2007 - OAuth started. 2008 - IETF normalization started. 2010 - RFC 5849 defines OAuth 1.0. 2010 - WRAP (Web Resource Authorization Profiles) proposed by Microsoft, Yahoo! and Google. 2010 - OAuth 2.0 work begins in IETF. Working deployments of various drafts at Google, Microsoft, Facebook, Github, Twitter, Flickr, Dropbox\u0026hellip; Mid 2012 - Lead auth and editor resigned \u0026amp; withdraws his name from all specs. October 2012 - RFC 6749, RFC 6750 defines OAuth 2.0. OAuth 1.0 does not need https, it has build-in encryption. OAuth 2.0 try to simplify OAuth, editor didn\u0026rsquo;t like it, resigned.\nOAuth 1.0 more complicated and more secure compare to OAuth 2.0. OAuth 2.0 is more easy for client to integration. Security is trade-off.\nOAuth 2.0 Security and Best Practices There are complaints about OAuth2 security, an on-going IETF OAuth 2.0 Security Best Current Practice draft try to address this issue.\nOAuth 2.0 Security Best Current Practice describes security requirements and other recommendations for clients and servers implementing OAuth 2.0.\nRecommendations (Best Practices) It is RECOMMENDED to use end-to-end TLS. When comparing client redirect URIs against pre-registered URIs, authorization servers MUST utilize exact string matching. Clients MUST prevent Cross-Site Request Forgery (CSRF). In order to prevent mix-up attacks, clients MUST only process redirect responses of the authorization server they sent the respective request to and from the same user agent this authorization request was initiated with. Clients MUST prevent injection (replay) of authorization codes into the authorization response by attackers. The use of PKCE [RFC7636] is RECOMMENDED to this end. When using PKCE, clients SHOULD use PKCE code challenge methods that do not expose the PKCE verifier in the authorization request. Authorization servers MUST provide a way to detect their support for PKCE. clients SHOULD NOT use the implicit grant (response type \u0026ldquo;token\u0026rdquo;) or other response types issuing access tokens in the authorization response, unless access token injection in the authorization response is prevented and the aforementioned token leakage vectors are mitigated. Clients SHOULD instead use the response type \u0026ldquo;code\u0026rdquo; (aka authorization code grant type) or any other response type that causes the authorization server to issue access tokens in the token response, such as the \u0026ldquo;code id_token\u0026rdquo; response type. The privileges associated with an access token SHOULD be restricted to the minimum required for the particular application or use case. The resource owner password credentials grant MUST NOT be used. This grant type insecurely exposes the credentials of the resource owner to the client. Authorization servers SHOULD use client authentication if possible. Authorization servers SHOULD NOT allow clients to influence their \u0026ldquo;client_id\u0026rdquo; or \u0026ldquo;sub\u0026rdquo; value or any other claim if that can cause confusion with a genuine resource owner Bearer Token Usage Recommendations Bearer token just plain text, we must take care of this token to avoid expose security risk in OAuth2 implementation. There are some recommendations:\n Safeguard bearer tokens: Client implementations MUST ensure that bearer tokens are not leaked to unintended parties, as they will be able to use them to gain access to protected resources. This is the primary security consideration when using bearer tokens and underlies all the more specific recommendations that follow. Always use TLS (https) Validate TLS certificate chains. Don\u0026rsquo;t store bearer tokens in cookies. Issue short-lived bearer tokens. Issue scoped bearer tokens. Don\u0026rsquo;t pass bearer tokens in page URLs: Bearer tokens SHOULD NOT be passed in page URLs (for example, as query string parameters). Instead, bearer tokens SHOULD be passed in HTTP message headers or message bodies for which confidentiality measures are taken. Browsers, web servers, and other software may not adequately secure URLs in the browser history, web server logs, and other data structures. If bearer tokens are passed in page URLs, attackers might be able to steal them from the history data, logs, or other unsecured locations. OAuth 2.1 There is a good reading about coming OAuth 2.1. (also see https://oauth.net/2.1/ ) A brief summary as below.\nIn fact, the “core” OAuth spec, RFC 6749, isn’t even called a specification, it’s technically a “framework” you can use to build specifications from. Part of the reason for this is because it leaves a lot of things optional, and requires that an implementer makes decisions about things like which grant types to support, whether or not refresh tokens are one-time use, and even whether access tokens should be Bearer tokens or use some sort of signed token mechanism.\nThis has often been quoted as the biggest failure of OAuth.\nOAuth has been patched and extended a lot in the last decade of experience deploying systems using it.\nThe overarching goals of OAuth 2.1 Give people a starting point which lays out a clear path for what they will need to read Reduce the number of documents people have to read to understand OAuth and implement it securely Get rid of the irrelevant content in old RFCs that has been deprecated, so that readers don’t get through an entire section only to discover a later RFC deprecated it Labeling libraries or products as OAuth 2.1 is a lot simpler to understand than having to figure out whether it accurately implements OAuth 2.0 and all the desired extensions OAuth 2.1 consolidates the changes published in later specs to simplify the core document.\nOAuth 2.1 major differences from OAuth 2.0 OAuth 2.1 major differences from OAuth 2.0 are listed below:\n PKCE is required for all OAuth clients using the authorization code flow Redirect URIs must be compared using exact string matching The Implicit grant (response_type=token) is omitted from this specification The Resource Owner Password Credentials grant is omitted from this specification Bearer token usage omits the use of bearer tokens in the query string of URIs Refresh tokens for public clients must either be sender-constrained or one-time use The definitions of public and confidential clients have been simplified to only refer to whether the client has credentials References Wiki: Authentication Wiki: Authorization What is OpenID? RFC 6749: OAuth2 Framework RFC 6750: OAuth2 Bearer Token Usage OAuth 2.0 Threat Model and Security Considerations OAuth 2.1 ","excerpt":"What is OAuth2 OAuth 2.0 focuses on client developer simplicity while providing specific …","ref":"https://djangocas.dev/blog/oauth2-101-introduction-to-oauth2-protocol/","title":"OAuth2 101: OAuth 2 Detailed Grant Flow Diagrams, Security Consideration and Best Practice"},{"body":"Plan server Like GitHub, I want to have git url like git@example.com:repos/myrepo.git, so I can clone as:\n$ git clone git@example.com:repos/myrepo.git Create git user To do this, I need create a user named git on my Linux server:\n$ sudo useradd -m git --shell /usr/bin/git-shell To prevent git user ssh login, use --shell /usr/bin/git-shell set git user shell to git-shell.\ngit-shell is a login shell for SSH accounts to provide restricted Git access. It permits execution only of server-side Git commands implementing the pull/push functionality, plus custom commands present in a subdirectory named git-shell-commands in the user’s home directory.\n NOTE\nYou can not set shell to /usr/sbin/nologin or /bin/false, it will cause git clone failure. You may get error like following:\n$ git clone git@my-example-server.com:repos/myrepo.git fatal: protocol error: bad line length character: This Add ssh public key authentication The ssh public key authentication is more secure than username / password authentication.\nssh server use $HOME/.ssh/authorized_keys to authenticate user.\nThe authorized_keys file in SSH specifies the SSH keys that can be used for logging into the user account for which the file is configured.\n$ cd $ mkdir .ssh $ touch authorized_keys $ chmod 600 authorized_keys Then add client\u0026rsquo;s ssh public key ($HOME/.ssh/id_rsa.pub) to authorized_keys\nPrepare a bare repo To host a git repo, it need a bare repository — a Git repository that has no working directory. It roughly equal the .git directory.\nCreate bare repo by git init Create a bare empty repo with --bare option:\n$ cd $HOME/repos $ git init --bare myrepo.git Initialized empty Git repository in /Users/git/repos/myrepo.git/ $ ls -l myrepo.git total 24 -rw-r--r-- 1 git staff 23 Jul 07 16:55 HEAD -rw-r--r-- 1 git staff 111 Jul 07 16:55 config -rw-r--r-- 1 git staff 73 Jul 07 16:55 description drwxr-xr-x 13 git staff 416 Jul 07 16:55 hooks drwxr-xr-x 3 git staff 96 Jul 07 16:55 info drwxr-xr-x 4 git staff 128 Jul 07 16:55 objects drwxr-xr-x 4 git staff 128 Jul 07 16:55 refs Create bare repo by git clone Create a bare repo from exist repo by clone with --bare:\n$ git clone --bare https://github.com/github/fetch.git Cloning into bare repository \u0026#39;fetch.git\u0026#39;... remote: Enumerating objects: 2129, done. remote: Total 2129 (delta 0), reused 0 (delta 0), pack-reused 2129 Receiving objects: 100% (2129/2129), 446.70 KiB | 924.00 KiB/s, done. Resolving deltas: 100% (1369/1369), done. $ ls fetch.git HEAD config description hooks info objects packed-refs refs Git clone After the setup, now can clone it:\n$ git clone git clone git@my-example-server.com:repos/myrepo.git Reference Git on the Server - Getting Git on a Server AUTHORIZED_KEYS FILE FORMAT ","excerpt":"Plan server Like GitHub, I want to have git url like git@example.com:repos/myrepo.git, so I can …","ref":"https://djangocas.dev/blog/setup-a-git-server-over-ssh/","title":"Setup a Git Server over SSH"},{"body":"Why Git Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.\n help git help outline the most common use git commands.\n$ git help usage: git [--version] [--exec-path[=\u0026lt;path\u0026gt;]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=\u0026lt;path\u0026gt;] [--work-tree=\u0026lt;path\u0026gt;] [--namespace=\u0026lt;name\u0026gt;] [-c name=value] [--help] \u0026lt;command\u0026gt; [\u0026lt;args\u0026gt;] The most commonly used git commands are: add Add file contents to the index bisect Find by binary search the change that introduced a bug branch List, create, or delete branches checkout Checkout a branch or paths to the working tree clone Clone a repository into a new directory commit Record changes to the repository diff Show changes between commits, commit and working tree, etc fetch Download objects and refs from another repository grep Print lines matching a pattern init Create an empty git repository or reinitialize an existing one log Show commit logs merge Join two or more development histories together mv Move or rename a file, a directory, or a symlink pull Fetch from and merge with another repository or a local branch push Update remote refs along with associated objects rebase Forward-port local commits to the updated upstream head reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index show Show various types of objects status Show the working tree status tag Create, list, delete or verify a tag object signed with GPG See \u0026#39;git help \u0026lt;command\u0026gt;\u0026#39; for more information on a specific command. You can also use help on a specific command, e.g. get help about commit:\n$ git help commit Config commit user name and email Set it globally:\n$ git config --global user.name \u0026#34;Your Name\u0026#34; $ git config --global user.email name@example.com Or set per repo:\n$ cd repo $ git config user.name \u0026#34;Your Name\u0026#34; $ git config user.email name@example.com Initial a repo $ mkdir /path/to/your/project $ cd /path/to/your/project $ git init $ echo \u0026#39;Hello\u0026#39; \u0026gt; README.md $ git add . $ git commit -m \u0026#34;First commit\u0026#34; Commit changed files Use status to see modified/added/deleted files\n$ git status On branch feature/foo Changes to be committed: (use \u0026#34;git reset HEAD \u0026lt;file\u0026gt;...\u0026#34; to unstage) deleted: lib/example.js Changes not staged for commit: (use \u0026#34;git add \u0026lt;file\u0026gt;...\u0026#34; to update what will be committed) (use \u0026#34;git checkout -- \u0026lt;file\u0026gt;...\u0026#34; to discard changes in working directory) modified: lib/index.js Add changed files to commit by git add:\n$ git add lib/index.js Check diff to be committed (files after git add):\n$ git diff --cached Check changes to be added by git diff:\n$ git diff Commit changes to repo by git commit:\n$ git commit -m \u0026#34;comments here...\u0026#34; Amend last commit message / author Change the last commit message by git commit --amend:\n$ git commit --amend -m \u0026#34;new comments for last commit here...\u0026#34; Change the last commit author by git commit --amend --author:\n$ git commit --amend --author \u0026#34;Foo \u0026lt;foo@example.com\u0026gt;\u0026#34; Reset git history You want to erase history after a specific commit.\nYou can erase history with git reset --hard \u0026lt;commit hash\u0026gt;:\n$ git reset --hard SHA1_HASH Warning: reset --hard is NOT revertible.\nCheckout a specific commit Jump to a old commit by checkout:\n$ git checkout SHA1_HASH History Check history by git log:\n$ git log commit f82a22c19cbc32576f64f5d6b3f24b99ea8179c7 Author: Foo \u0026lt;foo@example.com\u0026gt; Date: Tue May 16 17:11:22 2016 -0700 Fix typo Check history with short hash, tag, branch graph:\n$ git log --abbrev-commit --decorate --graph Check history with diff by git log -p:\n$ git log -p -p output is verbose, it include diff for each changed file.\nIf you only want to see changed files summary, use:\n$ git log --stat --summary Check diff for a specific commit by git show:\n$ git show fb0902fa # `fb0902fa` here is a commit hash. $ git show HEAD # the tip of the current branch $ git show experimental # the tip of the \u0026quot;experimental\u0026quot; branch Check diff in GUI by gitk:\n$ gitk NOTE: gitk required TK which is deprecated.\nYou can also use web interface to view history:\n$ git instaweb NOTE: instaweb need a web server, for mac you can install lighttpd which is recommended by git:\n$ brew install lighttpd Branch Create a new branch $ git branch experimental List branches Use branch to list local branches:\n$ git branch experimental * master * stands for your current working branch.\nList all branch:\n$ git branch -a List all remote branches:\n$ git branch -r Switch branch Switch branch by checkout \u0026lt;branch name\u0026gt;, it can be local branch name or remote branch name:\n$ git checkout experimental Rename branch Rename current branch name by -m:\n$ git branch -m \u0026lt;new branchname\u0026gt; If new branchname is already exist, need use -M to force rename instead of -m.\nDelete branch If all the commits are merged, delete a branch by git branch -d：\n$ git branch -d experimental If not all the commits are merged, force delete it by -D:\n$ git branch -d experimental error: The branch \u0026#39;experimental\u0026#39; is not fully merged. If you are sure you want to delete it, run \u0026#39;git branch -D experimental\u0026#39;. $ git branch -D experimental NOTE: -D will not check merge, all the changes on branch will get lost.\nPush local branch to remote repo $ git checkout mybranch $ git push origin mybranch Checkout remote branch $ git fetch $ git branch -r # list remote branches $ git checkout remote-branch1 Remove branch on remote repo $ git push origin :mybranch # remove remote branch $ git branch -d mybranch # also remove from local orphan branch orphan branch have no parents and it will be the root of a new history totally disconnected from all the other branches and commits.\nCreate a orphan branch:\ngit checkout --orphan \u0026lt;branchname\u0026gt; This will create a new branch with no parents. Then, you can clear the working directory with:\ngit rm --cached -r . Then add the documentation files, commit them and push them up to remote.\ntag Create tag $ git tag 1.2.3 # without tag message $ git tag -a 1.2.3 -m \u0026#39;Release 1.2.3\u0026#39; # with tag message Delete a tag $ git tag –d \u0026lt;tagname\u0026gt; NOTE: git tag -d only delete local tag, it do not delete tag in remote.\nTo remove a remote tag, push a empty reference:\n$ git push origin :tagname Or use --delete to remove remote tag:\n$ git push --delete origin tagname Example:\n$ git push origin :2.1 To git@github.com:foo/bar.git - [deleted] 2.1 List tags $ git tag v1.0 $ git tag -l \u0026#39;v*\u0026#39; # filter tag v4.3.1 Check tag detail Check tag detail info, include commit hash and diff by git show:\n$ git show v1.0 Push tag to remote By default, git push does not push tags to remote, need use --tags to push tags to remote:\n$ git push --tags Merge --squash - merge without branch history Use --squash to combine all the branch changes into a single commit, it will totally erase branch commit history:\n$ git checkout master $ git merge --squash iss10 $ git commit -m \u0026quot;Merged iss10\u0026quot; Rebase In feature branch, use rebase instead of merge to avoid a merge commit in commit history:\n$ git fetch $ git rebase $ git push -f NOTE: rebase will change commit history, so if you remote branch, you need push with -f.\nRemote Add multiple remote $ git remote add gitlab git@gitlab.com:foo/bar.git $ git push gitlab master Map local branch name to a different name on remote git push can change branch name on remote, the following command will push local develop branch to remote azure as master branch.\n$ git push azure develop:master .gitignore Add files pattern to .gitignore to indicate git not manage it.\nExample of .gitignore\n/node_modules .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes Icon? ehthumbs.db Thumbs.db *.log # # xcode user settings # xcuserdata .gitignore is per project setting, use git config to specific a global gitignore file:\n$ git config --global core.excludesfile ~/.gitignore_global Reference Git user manual gitignore ","excerpt":"Why Git Git is a fast, scalable, distributed revision control system with an unusually rich command …","ref":"https://djangocas.dev/blog/git-quick-reference-cheatsheet/","title":"Git quick reference"},{"body":"Reduce package size Use files field in package.json to specific installed files The optional files field is an array of file patterns that describes the entries to be included when your package is installed as a dependency.\nFile patterns follow a similar syntax to .gitignore, but reversed: including a file, directory, or glob pattern (, **/, and such) will make it so that file is included in the tarball when it’s packed.\nOmitting the field will make it default to [\u0026quot;*\u0026quot;], which means it will include all files.\nUse .npmignore You can also provide a .npmignore file in the root of your package or in subdirectories, which will keep files from being included.\nExample of .npmignore:\n**/__tests__/** /testing/** /docs/ /coverage/ /.nyc-output/ .* *.png *.tgz *.log *.txt At the root of your package it will not override the “files” field, but in subdirectories it will. The .npmignore file works just like a .gitignore.\nIf there is a .gitignore file, and .npmignore is missing, .gitignore’s contents will be used instead.\nFiles included with the “package.json#files” field cannot be excluded through .npmignore or .gitignore.\nAlways included files Certain files are always included, regardless of settings:\n package.json README CHANGES / CHANGELOG / HISTORY LICENSE / LICENCE NOTICE The file in the “main” field Note README, CHANGES, LICENSE \u0026amp; NOTICE can have any case and extension. npm pack - Check packaged files before release Use npm pack to check what files will be included in release package.\nFor example:\n$ npm pack npm notice npm notice 📦 example-foo@1.0.5 npm notice === Tarball Contents === npm notice 35B index.js npm notice 808B package.json npm notice 3.0kB README.md npm notice 1.1kB LICENSE.txt npm notice === Tarball Details === npm notice name: example-foo npm notice version: 1.0.5 npm notice filename: example-foo-1.0.5.tgz npm notice package size: 2.3 kB npm notice unpacked size: 4.9 kB npm notice shasum: 310fbfbf632b37578d78bf9de17ca6d42b212091 npm notice integrity: sha512-2VxbWgzuRSYlm[...]I3L9Avma/c1ZQ== npm notice total files: 4 npm notice example-foo-1.0.5.tgz Scoped package Scoped package name starts with @, e.g. @types/superagent is a package with scope name (or organization name) types.\nScoped package help organize packages and avoid package name conflict.\nScopes and package visibility Un-scoped packages are always public. Private packages are always scoped. Scoped packages are private by default; you must pass a command-line flag --access=publish when publishing to make them public. E404 - Scope not found After change package name to a scoped package name in package.json, run npm publish may report E404 error:\n$ npm publish npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@foo%2fbar - Scope not found To solve this issue, need create a organization as scope name at https://www.npmjs.com/org/create .\nE402 - must sign up for private packages When publish scoped package, it may report following E402 error:\n$ npm publish npm ERR! publish Failed PUT 402 npm ERR! code E402 npm ERR! You must sign up for private packages : @foo/bar This is because the scoped packages are private by default which requires paying NPM for a private account.\nIf your package is public, you can publish with --access public flag:\n$ npm publish --access public Debug package locally before publish Install local package To test a package, run npm install with the full path to your package directory\n$ npm install path/to/local/package npm link Another way to debug local package is use npm link.\nFirst run npm link in local package directory, it will create a symbol link in npm global installation.\nThen in another package directory, use npm link packagename to link install packagename as a dependence.\nFor example:\n$ cd ~/dev/foo # go into the package directory $ npm link # creates global link to `foo` $ $ cd ~/dev/bar # go into some other package directory which use `foo`. $ npm link foo # link-install the package, you can treat as `npm install foo` Now, any changes to ~/dev/foo will be reflected in ~/dev/bar/node_modules/foo/.\nHappy debugging.\nNote If your linked package is scoped, your link command must include that scope.\nFor example:\n$ npm link @foo/bar Semantic versioning Semantic versioning helps other developers who depend on your code understand the extent of changes in a given version, and adjust their own code if necessary.\nSemantic versioning in a nutshell, given a version number MAJOR.MINOR.PATCH, increment the:\n MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. In package.json, use ^ or ~ to specific compatible version:\n ^ for compatible with minor release upgrade. e.g. \u0026ldquo;^1.2.3\u0026rdquo; compatible with \u0026ldquo;1.5.8\u0026rdquo; but not \u0026ldquo;2.0.1\u0026rdquo; because \u0026ldquo;2.0.1\u0026rdquo; have a major version upgrade. ~ for compatible with patch release upgrade. e.g. \u0026ldquo;~1.2.3\u0026rdquo; compatible with \u0026ldquo;1.2.5\u0026rdquo; but not \u0026ldquo;1.5.8\u0026rdquo; because \u0026ldquo;1.5.8\u0026rdquo; have a minor version upgrade. It is recommended to use ^ or ~ to specific dependencies, for example:\n\u0026#34;dependencies\u0026#34;: { \u0026#34;foo\u0026#34;: \u0026#34;~1.0.0\u0026#34;, // compatible with 1.0.x \u0026#34;bar\u0026#34;: \u0026#34;^2.2.0\u0026#34; // compatible with 2.x.x }, Note You can also use * to allow major version upgrade. However it is not recommended since major version upgrade having break API changes may cause un-expected behavior.\nExample:\n\u0026#34;dependencies\u0026#34;: { \u0026#34;foobar\u0026#34;: \u0026#34;*\u0026#34;, // Will install the latest version of foobar, not recommended. }, Reference Contributing packages to the registry Semantic Versioning ","excerpt":"Reduce package size Use files field in package.json to specific installed files The optional files …","ref":"https://djangocas.dev/blog/npm-publish/","title":"npm publish"},{"body":"I used to use chkconfig to configure which service to run at system start up.\nWith my Raspberry Pi running based on Debian distribution, there is no chkconfig 😔.\nThe replacement for Debian is sysv-rc-conf: Run-level configuration for SysV like init script links.\nsysv-rc-conf gives an easy to use interface for managing /etc/rc{runlevel}.d/ symlinks.\nInstall sysv-rc-conf sysv-rc-conf can be installed by apt-get:\n$ sudo apt-get install -y sysv-rc-conf Use sysv-rc-conf After installation, just run\n$ sudo sysv-rc-conf It will show a text based window user interface to easily manage which service to run at system start up.\nList all of the services and if they are stopped or started when entering each runlevel by --list:\n$ sysv-rc-conf --list alsa-utils 0:off\t1:off\t6:off\tS:on avahi-daemon 0:off\t1:off\t2:on\t3:on\t4:on\t5:on\t6:off bluetooth 0:off\t1:off\t2:on\t3:on\t4:on\t5:on\t6:off bootlogs 1:on\t2:on\t3:on\t4:on\t5:on brightness 0:off\t6:off\tS:on cron 2:on\t3:on\t4:on\t5:on dbus 2:on\t3:on\t4:on\t5:on dhcpcd 0:off\t1:off\t2:on\t3:on\t4:on\t5:on\t6:off You can also enable/disable a service through command line with update-rc.d:\n$ sudo update-rc.d minidlna disable $ sudo update-rc.d vsftpd enable You can also specific run level when enable/disable a service:\n$ sudo update-rc.d vsftpd enable 3 5 # Only enable for level 3 5 Usage of update-rc.d:\n$ update-rc.d -h usage: update-rc.d [-f] \u0026lt;basename\u0026gt; remove update-rc.d [-f] \u0026lt;basename\u0026gt; defaults update-rc.d [-f] \u0026lt;basename\u0026gt; defaults-disabled update-rc.d \u0026lt;basename\u0026gt; disable|enable [S|2|3|4|5] -f: force The disable|enable API is not stable and might change in the future. ","excerpt":"I used to use chkconfig to configure which service to run at system start up.\nWith my Raspberry Pi …","ref":"https://djangocas.dev/blog/configure-debian-start-up-services-with-sysv-rc-conf/","title":"Configure Debian start up services with sysv-rc-conf"},{"body":"Problem I\u0026rsquo;m using django-cas-ng framework to authenticate users. The main problem is that the admin page still uses the default login view. Methods used this far: 1.- Using env var\nFrom docs:\nCAS_ADMIN_PREFIX: The URL prefix of the Django administration site. If undefined, the CAS middleware will check the view being rendered to see if it lives in django.contrib.admin.views.\n2.- Redirecting url on app/urls.py:\nurl(r'^arta/admin/login$', django_cas_ng.views.login, name=\u0026lsquo;cas_ng_login\u0026rsquo;) Everything is just ignored and the admin login form is shown.\nThe goal of this is to only authenticate with CAS and redirect the current /app/admin/login to CAS\n Since CAS is used for single sign on, use django-cas-ng to replace Django admin site\u0026rsquo;s login page is total make sense and can improve user experience.\nSolution The solution was overriding AdminSite. Django admin module overrides it\u0026rsquo;s own url redirects, so editing them on app/urls.py was useless.\nCreating an app/admin.py and extending AdminSite to override admin_view and get_urls:\nfrom django.contrib.admin import AdminSite from functools import update_wrapper from django.urls import NoReverseMatch, reverse from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_protect from django.http import Http404, HttpResponseRedirect import django_cas_ng.views class Admin(AdminSite): def admin_view(self, view, cacheable=False): \u0026#34;\u0026#34;\u0026#34; Decorator to create an admin view attached to this ``AdminSite``. This wraps the view and provides permission checking by calling ``self.has_permission``. You\u0026#39;ll want to use this from within ``AdminSite.get_urls()``: class MyAdminSite(AdminSite): def get_urls(self): from django.conf.urls import url urls = super(MyAdminSite, self).get_urls() urls += [ url(r\u0026#39;^my_view/$\u0026#39;, self.admin_view(some_view)) ] return urls By default, admin_views are marked non-cacheable using the ``never_cache`` decorator. If the view can be safely cached, set cacheable=True. \u0026#34;\u0026#34;\u0026#34; def inner(request, *args, **kwargs): if not self.has_permission(request): if request.path == reverse(\u0026#39;cas_ng_logout\u0026#39;, current_app=self.name): index_path = reverse(\u0026#39;admin:index\u0026#39;, current_app=self.name) return HttpResponseRedirect(index_path) # Inner import to prevent django.contrib.admin (app) from # importing django.contrib.auth.models.User (unrelated model). from django.contrib.auth.views import redirect_to_login return redirect_to_login( request.get_full_path(), reverse(\u0026#39;cas_ng_login\u0026#39;, current_app=self.name) ) return view(request, *args, **kwargs) if not cacheable: inner = never_cache(inner) # We add csrf_protect here so this function can be used as a utility # function for any view, without having to repeat \u0026#39;csrf_protect\u0026#39;. if not getattr(view, \u0026#39;csrf_exempt\u0026#39;, False): inner = csrf_protect(inner) return update_wrapper(inner, view) def get_urls(self): from django.conf.urls import url, include # Since this module gets imported in the application\u0026#39;s root package, # it cannot import models from other applications at the module level, # and django.contrib.contenttypes.views imports ContentType. from django.contrib.contenttypes import views as contenttype_views def wrap(view, cacheable=False): def wrapper(*args, **kwargs): return self.admin_view(view, cacheable)(*args, **kwargs) wrapper.admin_site = self return update_wrapper(wrapper, view) # Admin-site-wide views. urlpatterns = [ url(r\u0026#39;^$\u0026#39;, wrap(self.index), name=\u0026#39;index\u0026#39;), url(r\u0026#39;^login/$\u0026#39;, django_cas_ng.views.login, name=\u0026#39;login\u0026#39;), url(r\u0026#39;^logout/$\u0026#39;, django_cas_ng.views.logout, name=\u0026#39;logout\u0026#39;), url(r\u0026#39;^password_change/$\u0026#39;, wrap(self.password_change, cacheable=True), name=\u0026#39;password_change\u0026#39;), url(r\u0026#39;^password_change/done/$\u0026#39;, wrap(self.password_change_done, cacheable=True), name=\u0026#39;password_change_done\u0026#39;), url(r\u0026#39;^jsi18n/$\u0026#39;, wrap(self.i18n_javascript, cacheable=True), name=\u0026#39;jsi18n\u0026#39;), url(r\u0026#39;^r/(?P\u0026lt;content_type_id\u0026gt;\\d+)/(?P\u0026lt;object_id\u0026gt;.+)/$\u0026#39;, wrap(contenttype_views.shortcut), name=\u0026#39;view_on_site\u0026#39;), ] # Add in each model\u0026#39;s views, and create a list of valid URLS for the # app_index valid_app_labels = [] for model, model_admin in self._registry.items(): urlpatterns += [ url(r\u0026#39;^%s/%s/\u0026#39; % (model._meta.app_label, model._meta.model_name), include(model_admin.urls)), ] if model._meta.app_label not in valid_app_labels: valid_app_labels.append(model._meta.app_label) # If there were ModelAdmins registered, we should have a list of app # labels for which we need to allow access to the app_index view, if valid_app_labels: regex = r\u0026#39;^(?P\u0026lt;app_label\u0026gt;\u0026#39; + \u0026#39;|\u0026#39;.join(valid_app_labels) + \u0026#39;)/$\u0026#39; urlpatterns += [ url(regex, wrap(self.app_index), name=\u0026#39;app_list\u0026#39;), ] return urlpatterns site = Admin() The interesting lines are:\nadmin_view:\n if request.path == reverse('cas_ng_logout', current_app=self.name): reverse('cas_ng_login', current_app=self.name) get_urls:\nurl(r\u0026#39;^login/$\u0026#39;, django_cas_ng.views.login, name=\u0026#39;login\u0026#39;), url(r\u0026#39;^logout/$\u0026#39;, django_cas_ng.views.logout, name=\u0026#39;logout\u0026#39;) That will let you redirect the login and logout steps into CAS.\nReference Stackoverflow: Using django-cas-ng to authenticate on admin site ","excerpt":"Problem I\u0026rsquo;m using django-cas-ng framework to authenticate users. The main problem is that the …","ref":"https://djangocas.dev/blog/integrate-django-cas-ng-with-django-admin-site-authentication/","title":"Integrate django-cas-ng with Django admin site authentication"},{"body":"SLO Overview NOTE: Single Logout (SLO) need CAS Server support.\nWith Single Logout (SLO), user gets logged out not only from the CAS Server, but also from all visited CAS client applications.\ndjango-cas-ng proudly support SLO since release 3.5.0. The implementation is part of python-cas .\nTechnical Detail If SLO is supported by the CAS Server, the CAS Server MUST send a HTTP POST request containing a logout XML to all service URLs provided to CAS during this CAS session whenever a Ticket Granting Ticket is explicitly expired by the user (e.g. during logout).\nCAS Clients that do not support the SLO POST requests MUST ignore these requests. SLO requests MAY also be initiated by the CAS Server upon TGT idle timeout.\nExample Flow of Single Logout (SLO) XML request body in step 5 and 7:\n\u0026lt;samlp:LogoutRequest xmlns:samlp=\u0026#34;urn:oasis:names:tc:SAML:2.0:protocol\u0026#34; ID=\u0026#34;[RANDOM ID]\u0026#34; Version=\u0026#34;2.0\u0026#34; IssueInstant=\u0026#34;[CURRENT DATE/TIME]\u0026#34;\u0026gt; \u0026lt;saml:NameID xmlns:saml=\u0026#34;urn:oasis:names:tc:SAML:2.0:assertion\u0026#34;\u0026gt; @NOT_USED@ \u0026lt;/saml:NameID\u0026gt; \u0026lt;samlp:SessionIndex\u0026gt;[SESSION IDENTIFIER]\u0026lt;/samlp:SessionIndex\u0026gt; \u0026lt;/samlp:LogoutRequest\u0026gt; Reference CAS 101 CAS Protocol Specification ","excerpt":"SLO Overview NOTE: Single Logout (SLO) need CAS Server support.\nWith Single Logout (SLO), user gets …","ref":"https://djangocas.dev/blog/central-authentication-service-cas-single-logout-slo-work-flow/","title":"Central Authentication Service (CAS) Single Logout (SLO) Work Flow"},{"body":"CAS is a simple central authentication server protocol. It was initially conceived and developed by Shawn Bayern of Yale University Technology and Planning. It was later maintained by Drew Mazurek at Yale. CAS 1.0 implemented single-sign-on. CAS 2.0 introduced multi-tier proxy authentication. Several other CAS distributions have been developed with new features.\nIn December 2004, CAS became a project of the Java in Administration Special Interest Group (JASIG), which is as of 2008 responsible for its maintenance and development. Formerly called \u0026ldquo;Yale CAS\u0026rdquo;, CAS is now also known as \u0026ldquo;Jasig CAS\u0026rdquo;. In 2010, Jasig entered into talks with the Sakai Foundation to merge the two organizations. The two organizations were consolidated as Apereo Foundation in December 2012.\nAt the time of December 2006, CAS was in use at \u0026ldquo;hundreds of university campuses (among other beneficiaries)\u0026rdquo;.\nCAS Protocol Version History v1.0: May 4, 2005. The initial release of protocol. v2.0: April, 2013. Introduce proxy authentication support. v3.0.2: January 3, 2015. The latest release of protocol. Reference CAS Protocol Specification Apereo Central Authentication Service project ","excerpt":"CAS is a simple central authentication server protocol. It was initially conceived and developed by …","ref":"https://djangocas.dev/blog/cas-history/","title":"CAS History"},{"body":"CAS Introduction The Central Authentication Service (CAS) is a single-sign-on / single-sign-off protocol for the web. It permits a user to access multiple applications while providing their credentials (such as userid and password) only once to a central CAS Server application.\nThe CAS protocol is a simple and powerful ticket-based protocol.\nKey Conception The CAS server is the Central Authentication Service server. It responsible for authenticating users and granting accesses to applications.\n CAS Client is the software component that is integrated with a web application and interacts with the CAS server via CAS protocol. It response retrieve the identity of the granted users from the CAS server.\n service ticket: A service ticket is an opaque string that is used by the client as a credential to obtain access to a service. The service ticket is obtained from CAS upon a client\u0026rsquo;s presentation of credentials and a service identifier to /login\n CAS URIs CAS is an HTTP-based protocol that requires each of its components to be accessible through specific URIs.\n URI Description /login credential requestor / acceptor /logout destroy CAS session (logout) /validate service ticket validation [CAS 1.0] /serviceValidate service ticket validation [CAS 2.0] /proxyValidate service/proxy ticket validation [CAS 2.0] /proxy proxy ticket service [CAS 2.0] /p3/serviceValidate service ticket validation [CAS 3.0] /p3/proxyValidate service/proxy ticket validation [CAS 3.0] /login Simple login example:\nhttps://cas.example.org/cas/login?service=http%3A%2F%2Fwww.example.org%2Fservice\nThe service query parameter here is the URL of the application. This URL value MUST be URL-encoded. In this example, service is http://Fwww.example.org/service Once CAS server authenticated user, it will redirect to this URL with a serviceTicket query parameter.\n/logout destroys a client\u0026rsquo;s single sign-on CAS session. The ticket-granting cookie is destroyed, and subsequent requests to /login will not obtain service tickets until the user again presents primary credentials (and thereby establishes a new single sign-on session).\n/validate [CAS 1.0] checks the validity of a service ticket. /validate is part of the CAS 1.0 protocol and thus does not handle proxy authentication. CAS MUST respond with a ticket validation failure response when a proxy ticket is passed to /validate.\n/serviceValidate [CAS 2.0] checks the validity of a service ticket and returns an XML-fragment response. /serviceValidate MUST also generate and issue proxy-granting tickets when requested. /serviceValidate MUST NOT return a successful authentication if it receives a proxy ticket. It is RECOMMENDED that if /serviceValidate receives a proxy ticket, the error message in the XML response SHOULD explain that validation failed because a proxy ticket was passed to /serviceValidate.\n/proxyValidate [CAS 2.0] MUST perform the same validation tasks as /serviceValidate and additionally validate proxy tickets. /proxyValidate MUST be capable of validating both service tickets and proxy tickets.\n/proxy [CAS 2.0] provides proxy tickets to services that have acquired proxy-granting tickets and will be proxying authentication to back-end services.\n/p3/serviceValidate [CAS 3.0] MUST perform the same validation tasks as /serviceValidate and additionally return user attributes in the CAS response.\n/p3/proxyValidate [CAS 3.0] MUST perform the same validation tasks as /p3/serviceValidate and additionally validate proxy tickets.\nExample Authentication Flow The following diagram show an example authentication flow use CAS server.\nStep 1: User initial authentication request Step 2: Browser send login request to CAS client Step 3-4: CAS client redirect login request to CAS server Below are examples response in step 3 and request in step 4:\n302 Found Location: https://cas-server/cas/login?service=https%3A%2F%2Fcas-app%2Faccounts%2Flogin%3Fnext%3D%252F GET https://cas-server/cas/login?service=https%3A%2F%2Fcas-app%2Faccounts%2Flogin%3Fnext%3D%252F Step 5-6: CAS server show login form to user Step 7-8: User submit login form User send login credentials like username, password to CAS server directly. The request include service query parameter to indicate CAS server which service is doing authentication.\nPOST https://cas-server/cas/login?service=https%3A%2F%2Fcas-app%2Faccounts%2Flogin%3Fnext%3D%252F Step 9: CAS server redirect user to CAS client with service ticket service ticket in query parameter ticket. CAS Client need validate ticket in following step.\nBelow is an example response\n302 Found Location: https://cas-app/accounts/login?next=%2F\u0026amp;ticket=ST-1579821158 Step 10: Validate service ticket through /serviceValidate CAS Client need validate service ticket (ST) through CAS server /serviceValidate API.\nThe request is a GET request with service and ticket query parameter.\nBelow is an example request:\nGET https://cas-server/cas/serviceValidate?service=https%3A%2F%2Fcas-app%2Faccounts%2Flogin%3Fnext%3D%252F\u0026amp;ticket=ST-1579821158 Step 11: Response to /serviceValidate CAS response /serviceValidate to CAS client, the response is in XML format. If validate success, it will include user attributes (like username) in response.\nBelow is an example of /serviceValidate ticket validation successful XML response:\n\u0026lt;cas:serviceResponse xmlns:cas=\u0026#34;http://www.yale.edu/tp/cas\u0026#34;\u0026gt; \u0026lt;cas:authenticationSuccess\u0026gt; \u0026lt;cas:user\u0026gt;foo\u0026lt;/cas:user\u0026gt; \u0026lt;cas:proxyGrantingTicket\u0026gt;PGTIOU-234749-5d3e...\u0026lt;/cas:proxyGrantingTicket\u0026gt; \u0026lt;/cas:authenticationSuccess\u0026gt; \u0026lt;/cas:serviceResponse\u0026gt; Below is an example of /serviceValidate ticket validation failure XML response:\n\u0026lt;cas:serviceResponse xmlns:cas=\u0026#34;http://www.yale.edu/tp/cas\u0026#34;\u0026gt; \u0026lt;cas:authenticationFailure code=\u0026#34;INVALID_TICKET\u0026#34;\u0026gt; Ticket PGTIOU-234749-5d3e12d2df87dc not recognized \u0026lt;/cas:authenticationFailure\u0026gt; \u0026lt;/cas:serviceResponse\u0026gt; Step 12: CAS client redirect after validate ticket successfully CAS client redirect according next query parameter in service.\nCAS client also set cookie in browser to store session info.\nStep 13: Browser follow redirect request Browser also add cookie in request header to indicate user is logged in.\nStep 14-15: CAS client response content to user In step 14, CAS client need validate session cookie.\nReference CAS Protocol Specification ","excerpt":"CAS Introduction The Central Authentication Service (CAS) is a single-sign-on / single-sign-off …","ref":"https://djangocas.dev/blog/cas-101-introduction-to-cas-central-authentication-service/","title":"CAS 101: Introduction to CAS (Central Authentication Service)"},{"body":"","excerpt":"","ref":"https://djangocas.dev/index.json","title":""},{"body":"This is the blog section. It has two categories: Posts and Releases.\nFiles in these directories will be listed in reverse chronological order.\n","excerpt":"This is the blog section. It has two categories: Posts and Releases.\nFiles in these directories will …","ref":"https://djangocas.dev/blog/","title":"Blog"},{"body":" #td-cover-block-0 { background-image: url(/featured-background_huf923eb18a746a65b5139677f5268ac6a_173637_960x540_fill_q75_catmullrom_top.jpg); } @media only screen and (min-width: 1200px) { #td-cover-block-0 { background-image: url(/featured-background_huf923eb18a746a65b5139677f5268ac6a_173637_1920x1080_fill_q75_catmullrom_top.jpg); } } django-cas-ng Document Releases Django CAS (Central Authentication Service) 1.0/2.0/3.0 client library to support SSO (Single Sign On) and Single Sign Out!\n2014 - 2021\n\n Get Started CAS 101\nExample project\n Contributions welcome! We do a Pull Request contributions workflow on GitHub. New users are always welcome!\nRead more …\n Like us on github! Features Supports CAS_ versions 1.0, 2.0 and 3.0. Support Single Sign Out Supports Token auth schemes Can fetch Proxy Granting Ticket Supports Django 2.0, 2.1, 2.2 and 3.0 Supports using a User custom model Supports Python 3.5+ Installation pip install django-cas-ng Configuration INSTALLED_APPS = [ \u0026#39;django.contrib.admin\u0026#39;, \u0026#39;django.contrib.auth\u0026#39;, \u0026#39;django.contrib.contenttypes\u0026#39;, \u0026#39;django.contrib.sessions\u0026#39;, \u0026#39;django.contrib.messages\u0026#39;, \u0026#39;django.contrib.staticfiles\u0026#39;, \u0026#39;django_cas_ng\u0026#39;, # Add this line ... ] MIDDLEWARE = [ \u0026#39;django.middleware.common.CommonMiddleware\u0026#39;, \u0026#39;django.contrib.sessions.middleware.SessionMiddleware\u0026#39;, \u0026#39;django.contrib.auth.middleware.AuthenticationMiddleware\u0026#39;, \u0026#39;django_cas_ng.middleware.CASMiddleware\u0026#39;, # Add this line ... ] AUTHENTICATION_BACKENDS = [ \u0026#39;django.contrib.auth.backends.ModelBackend\u0026#39;, \u0026#39;django_cas_ng.backends.CASBackend\u0026#39;, # Add this line ] CAS_SERVER_URL = \u0026#39;https://your-cas-server-url/\u0026#39; CAS_VERSION = \u0026#39;3\u0026#39; See example integration and detail document about Configuration\n ","excerpt":"#td-cover-block-0 { background-image: …","ref":"https://djangocas.dev/","title":"django-cas-ng - Django CAS (Central Authentication Service) 1.0/2.0/3.0 client library to support SSO (Single Sign On) and Single Sign Out."},{"body":" .td-main { padding-top: 100px; } Privacy Policy Effective January 24, 2020. Last Revised January 24, 2020\nWe want you to understand how and why djangocas.dev (djangocas,” “we” or “us”) collects, uses, and shares information about you when you use our websites, mobile apps, and other online products and services (collectively, the \u0026ldquo;Services\u0026rdquo;) or when you otherwise interact with us or receive a communication from us.\nWhat We Collect Information We Collect Automatically When you access or use our Services, we may also automatically collect information about you. This includes:\n Log and usage data. We may log information when you access and use the Services. This may include your IP address, user-agent string, browser type, operating system, referral URLs, pages visited, links clicked, the requested URL, hardware settings, and search terms.\n Information collected from cookies and similar technologies. We may receive information from cookies, which are pieces of data your browser stores and sends back to us when making requests, and similar technologies. We use this information to improve your experience, understand user activity, personalize content and advertisements, and improve the quality of our Services.\n How We Use Information About You We use information about you to:\n Provide, maintain, and improve the Services; Research and develop new services; Monitor and analyze trends, usage, and activities in connection with our Services; and Personalize the Services and provide advertisements, content and features that match user profiles or interests. How Information About You Is Shared We do not share information to any third party.\nAds and Analytics Partners We may partner with third-party advertisers, ad networks, and analytics providers to deliver advertising and content targeted to your interests and to better understand your use of the Services. These third parties may collect information sent by your computer, browser, or mobile device in response to a request for content, such as unique identifiers, your IP address, or other information about your computer or device. For example:\nAdvertisers and Ad Networks Our ad partners and ad networks may use cookies and related technologies to collect information when ads are delivered to you on our Services. This site cannot see advertisers’ cookies and advertisers will not see this site\u0026rsquo;s cookies.\nAnalytics Partners We use analytics partners (such as Google Analytics) to help analyze usage and traffic for our Services. As an example, we may use analytics partners to analyze and measure, in the aggregate, the number of unique visitors to our Services.\nOther Information Information Security We take measures to help protect information about you from loss, theft, misuse and unauthorized access, disclosure, alteration, and destruction. For example, we only use HTTPS while information is being transmitted.\nData Retention We store the information we collect for as long as it is necessary for the purpose(s) for which we originally collected it.\nChanges to This Policy We may change this Privacy Policy from time to time. If we do, we will let you know by revising the date at the top of the policy. If we make a change to this policy that, in our sole discretion. By continuing to use our Services after Privacy Policy changes go into effect, you agree to be bound by the revised policy.\nContact Us If you have other questions about this Privacy Policy, please contact us at privacy@djangocas.dev .\n","excerpt":".td-main { padding-top: 100px; } Privacy Policy Effective January 24, 2020. Last Revised January …","ref":"https://djangocas.dev/privacy/","title":"Privacy Policy"},{"body":"","excerpt":"","ref":"https://djangocas.dev/search/","title":"Search Results"},{"body":"iOS \u0026amp; iPadOS 16.4 Beta 2 Released on Feb 28, 2023. Here is what\u0026rsquo;s the change on SwiftUI.\nNew Features in SwiftUI iOS 16.4 beta 2 A family of new view modifiers lets you build even richer resizable sheet experience with SwiftUI. Use these new modifiers to make the view behind a sheet interactive, provide a translucent background, control scrolling and expansion behavior, and even adjust the corner radius of the sheet.\nTo let people interact with the content behind a sheet, use the .presentationBackgroundInteraction(_:) modifier. The following example enables people to interact with the view behind the sheet when the sheet is at the smallest detent, but not at the other detents:\nstruct ContentView: View { @State private var showSettings = false var body: some View { Button(\u0026#34;View Settings\u0026#34;) { showSettings = true } .sheet(isPresented: $showSettings) { SettingsView() .presentationDetents( [.height(120), .medium, .large]) .presentationBackgroundInteraction( .enabled(upThrough: .height(120))) } } } Give your sheet a translucent background with the new presentationBackground(_:) modifier. The following example uses the thick material as the sheet background:\nstruct ContentView: View { @State private var showSettings = false var body: some View { Button(\u0026#34;View Settings\u0026#34;) { showSettings = true } .sheet(isPresented: $showSettings) { SettingsView() .presentationBackground(.thickMaterial) } } } Add a custom view as the background of your sheet with the presentationBackground(alignment:content:) modifier.\nBy default, when a person swipes up on a scroll view in a resizable presentation, the presentation grows to the next detent. A scroll view embedded in the presentation only scrolls after the presentation reaches its largest size. Use the new presentationContentInteraction(_:) modifier to control which action takes precedence.\nFor example, you can request that swipe gestures scroll content first, resizing the sheet only after hitting the end of the scroll view, by passing the .scrolls value to this modifier:\nstruct ContentView: View { @State private var showSettings = false var body: some View { Button(\u0026#34;View Settings\u0026#34;) { showSettings = true } .sheet(isPresented: $showSettings) { SettingsView() .presentationDetents([.medium, .large]) .presentationContentInteraction(.scrolls) } } } Apply the new .presentationCompactAdaptation(_:) modifier to the content of a modal presentation to control how it adapts to compact size classes on iPad and iPhone.\nFor example, the popover modifier presents a popover on iPad. By default, a popover adapts to the narrow horizontal size class on iPhone by showing as a sheet. In the example below, the .presentationCompactAdaptation(.none) modifier asks SwiftUI to show this as a popover on iPhone as well.\nstruct PopoverExample: View { @State private var isShowingPopover = false var body: some View { Button(\u0026#34;Show Popover\u0026#34;) { self.isShowingPopover = true } .popover(isPresented: $isShowingPopover) { Text(\u0026#34;Popover Content\u0026#34;) .padding() .presentationCompactAdaptation(.none) } } } Use .presentationCompactAdaptation(horizontal:vertical:) to adapt differently in horizontally and vertically compact size classes. (103257577)\nResolved SwiftUI Issues in iOS 16.4 beta2 Fixed: ScrollView has improved support for right to left languages by default. If you have a ScrollView that shouldn\u0026rsquo;t change its behavior in right to left languages, use the .environment(.layoutDirection, .leftToRight) modifier to ensure the ScrollView always sees a left to right layout direction. (65108729)\n Fixed: Refreshable modifiers applied to lists will no longer also apply to lists or scroll views within the content of that list. Re-apply a refreshable modifier to the content of the list if this is desired behavior. (102052575)\n Fixed: The no-argument presentationBackground() modifier has been removed. Use one of the overloads taking an explicit ShapeStyle or View instead. (105598868)\n Deprecations SwiftUI in iOS 16.4 beta2 TimelineView initializers that pass an instance of TimelineView\u0026lt;_, _\u0026gt;.Context into its content closure have been deprecated in this release, and replaced with equivalent versions that pass an instance of TimelineViewDefaultContext instead.\n Several table initializers that were previously deprecated and replaced in iOS 16.2 and macOS 13.1 have now been removed from the API. Using these initializers will now generate a build error, with a Fix-It to switch to the replacement initializer API. For code that doesn\u0026rsquo;t generate this error, no action is needed.\n This change, along with other improvements in the Swift compiler, improve the performance of compiling Swift and SwiftUI code.\nThe new, replacement API adds a parameter, of:, that identifies the type of the Table\u0026rsquo;s row values separately from the initializer\u0026rsquo;s row and column content closure parameters. This improves compilation performance in two ways. First, by knowing the row value type up-front, the compiler doesn\u0026rsquo;t need to infer that type from the body implementations of each closure. Second, the compiler can immediately enforce that each closure uses the same row value type in its body implementation, instead of needing to verify that the inferred types are equal after evaluating each closure.\nThe following examples show code for creating a Table before and after adoption of the new API:\n// before (will now produce an error): Table { TableColumn(\u0026#34;Name\u0026#34;, value: \\.name) TableColumn(\u0026#34;Email\u0026#34;, value: \\.email) } rows: { ForEach(people) { person in TableRow(person) } } // after: Table(of: Person.self) { TableColumn(\u0026#34;Name\u0026#34;, value: \\.name) TableColumn(\u0026#34;Email\u0026#34;, value: \\.email) } rows: { ForEach(people) { person in TableRow(person) } } SwiftUI Navigation changes on iOS 16.4 beta2 Resolved Issues Fixed: Navigation destinations nested within NavigationStack and NavigationSplitView are detected more performantly and reliably, no longer logging update cycles. (97597634)\n Fixed: Navigation destinations that present a new view on top of a NavigationSplitViewColumn (rather than pushing a view onto a stack in that column) no longer cause an assertion failure on iOS or infinite loop on macOS when the destination view is itself a NavigationStack.\n For example, the below construction is functional\n NavigationSplitView { SidebarView() .navigationDestination(isPresented: $present) { NavigationStack { ... } } } detail: { ... } (103278180) Fixed: Navigation destinations with data dependencies captured from ancestor views update more reliably. struct DataDependentNavigation: View { @State var changeColor: Bool = false @State var present: Bool = false var body: some View { NavigationSplitView { Color.blue .navigationDestination(isPresented: $present) { // This is a data dependency from an ancestor view changeColor ? Color.green : Color.yellow } } detail: { Color.teal } } Related pages: Swift Data init with heap buffer from C and free in Swift DispatchQueue QoS Order Explained Best Practices \u0026amp; Common Pitfalls to Avoid iOS RUNNINGBOARD 0xdead10cc crash troubleshooting iOS objc_retain crash troubleshooting SwiftUI: How to Tap to Select All Text in a TextField on iOS Direct Download Link for All Xcode Releases/Beta, Compilers and SDK Information Guide: Jailbreaking Apple TV 4K iOS Security: App security in iOS and iPadOS - code signing, entitlement and sandbox etc. Tips on Use Swift Package Manager (SPM) with Continuous Integration / Delivery (CI/CD) Jailbreak iPhone 8 iOS 16.2 with palera1n and use frida dump to decrypt ipa Use frida and objection to penetration test iOS app security Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/... References https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-16_4-release-notes ","excerpt":"iOS \u0026amp; iPadOS 16.4 Beta 2 Released on Feb 28, 2023. Here is what\u0026rsquo;s the change on SwiftUI. …","ref":"https://djangocas.dev/blog/ios/swiftui-changes-in-ios-16.4-beta2/","title":"What's new in SwiftUI iOS 16.4 beta 2"}]